pcolormesh does not work with south pole ortho projection
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- matplotlib, numpy, python
- Domain
- data-visualization
Research direction
Start with the supplied Basemap ortho projection reproduction, comparing lat_0=90 with lat_0=-90 through the pcolormesh path. Review related issues #347 and #350, then verify that the southern projection displays the data correctly without breaking the existing northern projection behavior.
Written by the indexing model from the issue text.
Description
The north pole works fine when setting lat_0=90 but when setting lat_0=-90 it doesn't work. The data shown in the southern projection is nonsense.
Related to #347 and #350 but the workaround described there for the "stereo" projection does not work for the "ortho" projection.
Code to replicate:
from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt
lons = np.arange(-179.95, 180.01, 0.1)
lats = np.arange(-89.95, 90.01, 0.1)
# m = Basemap(projection='ortho', lon_0=-270, lat_0=-90., resolution='c')
m = Basemap(projection='ortho', lon_0=0, lat_0=90., resolution='c')
data = np.random.random((1800, 3600))
lons, lats = np.meshgrid(lons, lats)
x, y = m(lons, lats)
# data = np.ma.masked_where((x < m.xmin) | (x > m.xmax) | (y < m.ymin) | (y > m.ymax), data)
im = m.pcolormesh(x, y, data, latlon=False, cmap='RdBu')
m.colorbar(im)
m.drawcoastlines()
m.drawcountries()
plt.show()
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
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.
More from matplotlib/basemap
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
matplotlib/basemap#368 ·
-
Python 3.14 wheels Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
matplotlib/basemap#652 · 2 comments · 5 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
matplotlib/basemap#649 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
matplotlib/basemap#646 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
matplotlib/basemap#645 · 2 comments ·
All issues in matplotlib/basemap
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·