Axis labels missing from south polar plot

Hi,

I am new to pygmt and gmt (I normally use Cartopy) and would like to explore plotting polar stereographic projections for the Arctic and Antarctica. I started with a simple plot, which works fine for the North Pole (Arctic, projection=“S0.0/90.0/5i”), but for the South Pole (Antarctica, projection=“S0.0/-90.0/5i”) there are no axis labels showing.
I can’t work out why. Any help appreciated. Code for both below:

Missing axis labels in this plot (south polar plot)

import pygmt
fig = pygmt.Figure()
fig.basemap(region=[0, 360, -90, -60],
projection=“S0.0/-90.0/50/5i”,
frame=[“a”, ‘+t"Antarctica"’])
fig.coast(shorelines=True)
fig.savefig(“antarctica.png”)

Axis labels show ok in this one (north polar plot)

import pygmt
fig = pygmt.Figure()
fig.basemap(region=[0, 360, 60, 90],
projection=“S0.0/90.0/5i”,
frame=[“a”, ‘+t"Arctic"’])
fig.coast(shorelines=True)
fig.savefig(“arctic.png”)


This gives you the annotations, however, it does not work in combination with a title. Not sure why, maybe @maxrjones can answer this question.

import pygmt

fig = pygmt.Figure()
fig.coast(region = [0, 360, -90, -60], projection = "S0.0/-90.0/50/5i", shorelines = True)
fig.basemap(frame = ["a", "WSNE"])
fig.show()

Thanks. That’s very helpful. It would be nice to know why adding “WSNE” is necessary in the Southern Hemisphere but not the north. However, having a working solution is the main thing. I guess the title issue is less important (at the moment anyway).

Here is an example with the title:

import pygmt

fig = pygmt.Figure()
fig.coast(region = [0, 360, -90, -60], projection = "S0.0/-90.0/50/5i", shorelines = True)
fig.basemap(frame=["a", 'WNSE+t"Antarctica"'])
fig.show()

I agree that the annotations should be plotted automatically. Since this is an upstream issue, you could open a bug report in the GMT repository (https://github.com/GenericMappingTools/gmt/issues) (instructions are here).

Thanks @maxrjones for the clarification. A frame=["a", 'N+t"Antarctica"'] would be sufficient in this case. As @maxrjones mentioned the annotations are not plotted automatically for the region of Antarctica while they appear by default for the Arctic case (same as you would set frame=["a", 'S+t"Arctic"']).

Thanks both. That now works. I’ll open a bug report in the GMT repo.

although slightly worrying I found a bug in GMT on my first ever plot… :grinning:

Actually, it is more of an unintended consequence of a recent change to which frames should be annotated by default in moder mode. IT used to be WESN (all) but we changed that to WeSn. We did not think this fully through what that means for some specific projections like your S pole plot where there is no S frame. Clearly, we will fix this by flipping to WesN for polar azimuthal containing the S pole, etc.

FYI I decided to open the issue for this bug so that we could have the equivalent gmt code - https://github.com/GenericMappingTools/gmt/issues/6055

1 Like