Skip to content

Inverted imshow using Cairo backend #7156

Description

@QuLogic

In testing some stuff for #7151, I realized that the Cairo backend inverts images plotted using imshow.

import matplotlib as mpl
mpl.use('Cairo')
import numpy as np
import matplotlib.pyplot as plt

a = np.random.randn(3,3)

im1 = plt.imshow(a, extent = [0,1,0,1])
plt.xlim(0,2.2)
plt.ylim(0,2.2)

plt.savefig('test.png')

It doesn't really matter if saving as png or pdf, the outcome is the same. With Agg, the image appears in the lower left corner:
test
With Cairo, the image appears in the upper left corner:
test

It worked correctly with mpl 1.4.3 and is broken with 1.5.0, but bisection is next to impossible because the Cairo backend was broken for a very long time.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions