Skip to content

Line on a map projection not plotted correctly #274

@JeremyBloxham

Description

@JeremyBloxham

Description

When plotting a line on a projection, 360 degrees gets added to the longitude of each point, except the first, resulting in the line wrapping around the globe between the first and second points.

Steps to reproduce

import proplot as pplt
lons = [307., 292., 280., 269., 259., 249., 239., 228.]
lats = [ 51., 32., 11., -8., -24., -36., -46., -54.]
fig, ax = pplt.subplots(proj='cyl',basemap=False, width=20, height=12, proj_kw={'lon_0': 180})
ax.plot(lons, lats)

Expected behavior: line without 360 degree warp

Actual behavior: first point wrapped 360 degrees.

Equivalent steps in matplotlib

Please make sure this bug is related to a specific proplot feature. If you're not sure, try to replicate it with the native matplotlib API. Matplotlib bugs belong on the matplotlib github page.

# your code here, if applicable

Proplot version

3.3.3. 0.8.1

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