Skip to content

How to remove latitude labels in x axis in cartopy 0.18 #1530

@smartlixx

Description

@smartlixx

Description

When I test the beta version of 0.18, I find some weird behavior in the new gridliner labels. While I can fix most of them by digging into the code, one thing I can't change is that there are sometimes latitude labels in x axes and longitude labels in y axes. Is there any way to disable this behavior?

Code to reproduce

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

lamber_crs = ccrs.LambertConformal(central_longitude=105) 
ax0 = plt.axes(projection=lambert_crs)
ax0.set_extent([70, 140, 15, 52], crs=ccrs.PlateCarree())
gl = ax0.gridlines(draw_labels=True, dms=True, x_inline=False, y_inline=False)
gl.top_labels = gl.right_labels = False
gl.rotate_labels = False
ax0.coastlines(resolution='10m')
plt.show()

Traceback


Full environment definition python 3.7

cartopy 0.18b2

image

Operating system

Cartopy version

conda list

pip list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions