matplotlib / matplotlib/basemap
readshapefile() inconsistencies
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.

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.

Is it possible to change the center longitude while plotting a shapefile?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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