Skip to content

Why doesn't "x" work with cartopy/basemap plots? #131

Closed
@lukelbd

Description

@lukelbd

I recently received an email with some questions on formatting cartopy/basemap axes, so I thought I'd put my response here so I can refer to it for other users.

Q: Why doesn't "label sharing" work with cartopy/basemap axes? In this example:

f,axs = plot.subplots(ncols=2,axwidth=3,proj='pcarree',
                      share=3,order='F',axpad='1em')

axs.format(land=True,labels=True,suptitle='Climatology BLT',
           lonlim=(105,121),latlim=(3,23),lonlines=5,latlines=5,
           landcolor='gray',grid=False)

we get latitude/longitude labels on every side.

A: Sharing meridion and parallel labels is not yet supported. However there is an open feature request: #79

Q: How can I change the tick label location on cartopy/basemap axes? Changing tickdir doesn't work:

axs.format(geoaxesedgecolor='red',tickdir='in',
           suptitlecolor='blue',suptitlesize=30,
           )

A: The tickdir keyword is another rc setting that has no effect on cartopy/basemap axes. If you want to change the meridian/parallel label location, use the lonlabels and latlabels keywords (see this page for details).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions