Skip to content

Regression: imshow on geo axes produces an empty plot in matplotlib 2.0.0 #7903

Description

@lpsinger

Bug summary

In Matplotlib 1.5.3, it was possible to use imshow on geo axes (e.g. the mollweide projection defined in matplotlib.projections.geo. In Matplotlib 2.0.0, this produces a blank plot.

Code for reproduction

Here is an example that worked in 1.5.3.

from matplotlib import pyplot as plt
import numpy as np

lon = np.linspace(-np.pi, np.pi)
lat = np.linspace(-np.pi/2, np.pi/2)
lon, lat = np.meshgrid(lon, lat)

ax = plt.axes(projection='mollweide')
ax.grid()
ax.imshow(lon, extent=[-np.pi, np.pi, -np.pi/2, np.pi/2], aspect=ax.get_aspect())
plt.savefig('test.png')

Actual outcome

This is the output on Matplotlib 2.0.0: blank axes.
test-2 0 0

Expected outcome

This was the output in Matplotlib 1.5.3.
test-1 5 3

Matplotlib version

Installed from MacPorts on OS X 10.11.6 "El Capitan". Port versions:

  • py27-matplotlib @1.5.3_0+cairo
  • py27-matplotlib @2.0.0_0+cairo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions