I am new to PyGMT, and i encounter a problem. Is there any possible way for us to use cmap ‘rainbow’ to create an equidistant color legends with series=[‘0.01,0.03,0.05,0.1,0.2,0.3,0.5,1,3,5,10,20’] which are not equally spaced.
This is how the code look like:
fig = pygmt.Figure()
pygmt.config(MAP_FRAME_TYPE=“plain”)
pygmt.config(FONT_TITLE=“20,Helvetica”)
cpt = pygmt.makecpt(rainbow=‘rainbow’,series=[‘0.01,0.03,0.05,0.1,0.2,0.3,0.5,1,3,5,10,20’],continuous=True)
fig.grdimage(grid=chla_oct_2019.CHL[0], cmap=cpt, projection=“M15c”, frame [“WSne”,“xa10f5”,“yaf5”])
fig.colorbar(cmap=cpt,position=“JMR+o0.5c/0c+w6.9c”,L=True)
fig.plot(data=np.array([[76.5,-2,95,2]]), style=‘r+s’, pen=“1p,white”)
Any way of making it into something like this.
Blockquote