How could I change the azimuth axis label range from -180–180 to 0–360 in a polar coordinate system? Thanks!
Hello @tianzeliu,
this can be accomplished by changing the GMT defaults, in your case FORMAT_GEO_MAP
(for details please see gmt.conf — GMT 6.6.0 documentation). For an overview of GMT’s defaults you may want to have a look at gmt.conf — GMT 6.5.0 documentation (generic-mapping-tools.org).
Do you use GMT or one of the wrappers? In principle it should be the same for all.
Please find below a code example using PyGMT. Does the output figure fit your needs?
Code example:
import pygmt
# create figure object
fig = pygmt.Figure()
# change GMT defaults
# for details please see
# https://docs.generic-mapping-tools.org/dev/gmt.conf.html#term-FORMAT_GEO_OUT
pygmt.config(
FORMAT_GEO_MAP="+D", # change from [-180,180] to [0,360]
)
fig.basemap(
region="0/360/0/10",
# P Polar projection
# +a to start with zero at top (North) and go clockwise (to East)
projection="P2c", # "+a",
frame="af",
)
fig.show()
# fig.savefig(fname="frame_polar_0to360deg.png")
Output figure:
That works. Thanks!