Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inverted imshow using Cairo backend #7156

Copy link
Copy link
Closed
@QuLogic

Description

@QuLogic
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.