fig.colorbar(frame= 'af+l"depth (km)"' ) fig.show() data points(气泡图) map with contour lines fig = pygmt.figure() fig.grdimage( grid=grid, cmap= "haxby" , projection= "m10c" , frame=true, ) fig.grdcontour( annotation=1000, interval=2...
pygmt.makecpt(cmap='seis',series=[0,60,2],reverse=True,background='o')fig.plot(x=s1,y=m1,color=z,cmap=True,style='c0.04')fig.plot(x=x,y=regress,pen='0.5')fig.text(text='@;blue;y = 0.791 x + 481.469@;;',x=2000,y=1900,pen='thinner',fill='white',font='12p,Times-Itali...
In classic gmt the function makecpt is used to create a "cpt" file that acts as a color map for plotting data in grdimage and in plotting a colorbar. In its present state, pygmt does not (to the best of my knowledge) allow for creating a custom colormap for use in both grdimage ...
For the later case, would this mean that we remove the current legend example or include it in this new tutorial? Maybe it is still good to have a short example showing how to add a legend in principle. I think we have both a tutorial and multiple gallery examples. The tutorial should ...
fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"]) # Activate the second panel so that the colormap created by the makecpt # method is a panel-level CPT with fig.set_panel(panel=1): pygmt.makecpt(cmap="globe", series=[-6000, 3000]) ...