Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pcolormesh does not work with south pole ortho projection

Open
#409 1 comment 0 reactions 0 assignees View on GitHub

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

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

  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.

More from matplotlib/basemap

All issues in matplotlib/basemap

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.