matplotlib / matplotlib/basemap

readshapefile() inconsistencies

Open
#410 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
817
Forks
395
PR merge metrics
No merged PRs in 30d

Description

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt

map = Basemap(projection='robin', lat_0=0, lon_0=100)
map.readshapefile('./Paleo_Sturtian_750Ma', 'Paleo_Sturtian_750Mm')
plt.show()

The shapefile I'm using can be downloaded from: my github.

Using the "robin" projection:

  • lon_0=0 everything works fine
  • lon_0 = anything else; causes wrap around problems. Horizontal lines through the plot.
    robin

Using the "cyl" projection:

  • lon_0=0 everything works fine.
  • lon_0 = anything else; No lines through the plot but doesn't plot the right side of the shape file.
    cyl

Is it possible to change the center longitude while plotting a shapefile?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided Basemap example with the linked shapefile and compare readshapefile() behavior for the robin and cyl projections at lon_0=0 and other center longitudes. Trace the readshapefile() entry point and projection-related handling; done means the shapefile renders without wraparound lines or missing geometry when lon_0 changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.