Skip to content

Wrong grid line labels with Lambert projection #165

@zxdawn

Description

@zxdawn

Description

Now, the newest cartopy (0.18.0) supports adding grid line labels to the Lambert projection.

But, the labels shown by proplot are wrong.

I suppose proplot misses some keys:

x_inline=False, y_inline=False

Steps to reproduce

import proplot as plot
f, axs = plot.subplots(proj='lcc')
axs.format(coast=True,
           latlines=1, lonlines=1,
           labels=True,
           lonlim=(113, 119),
           latlim=(37, 41.5))

Expected behavior:
proj_cartopy

Actual behavior:

proj

Equivalent steps in matplotlib

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

proj = crs.LambertConformal(central_latitude = 38.854,
                            central_longitude = 115.643,
                            standard_parallels = (30, 60),
                            false_easting = 64.,
                            false_northing = 67.)


axs = plt.axes(projection=proj)
axs.coastlines()
axs.set_extent([113, 119, 37, 41.5], crs=crs.PlateCarree())
gl = axs.gridlines(draw_labels=True, dms=True, x_inline=False, y_inline=False)
gl.top_labels = gl.right_labels = False

Proplot version

master branch

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