Question about disabling axis labels

Hello,

Example “Displaying positions on a blank map”: Displaying positions on a blank map,

If change the scale from scale=[220, 220] to scale=[120, 120], then the Stonyhurst longitudes and latitudes are displayed on the top and right plot axes. Is there a way to disable the labels on these axes?

Hello @khlystova,

So those ticks on the right-side and topside come from the grid that appear when the lines interest the figure axes.

Doing the following removed them for me, I am not sure if there is a shorthand that will disable them with one line.

If you replace the draw_grid line with

grid = blank_map.draw_grid(axes=ax, color="k")

then add the following just before the plt.show

grid['lon'].set_ticks_visible(False)
grid['lon'].set_ticklabel_visible(False)
grid['lon'].set_axislabel('')
grid['lat'].set_ticks_visible(False)
grid['lat'].set_ticklabel_visible(False)
grid['lat'].set_axislabel('')

That should make it disappear.

Nabil, thank you very much, it works!