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

MacOSX backend incorrectly displays plot/scatter under Affine2D transform #1886

Copy link
Copy link
Closed
@jdgleeson

Description

@jdgleeson
Issue body actions

The default MacOSX backend does not display the expected output for the following code. Both the QT4Agg and TkAgg backends display correctly.

Code illustrating the problem:

# from matplotlib import use
# use("QT4Agg")
# use("TkAgg")
import matplotlib.pyplot as plt
import matplotlib.transforms as mtrans
import numpy as np

plt.figure()
ax = plt.subplot(111)
base_trans = ax.transData
mtx = np.array([[1,1,0], 
                [0,1,0], 
                [0,0,1]])
tr = mtrans.Affine2D(matrix=mtx) + base_trans

plt.plot([1,2,3], [1,2,3], 'gray', transform=tr)
plt.scatter([1,2,3], [1,2,3], c='k', marker='D', transform=tr)
plt.show()

Environment:

>>> import matplotlib
>>> matplotlib.__version__
'1.2.0'
>>> matplotlib.__file__
'/opt47/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.pyc'
>>> matplotlib.get_configdir()
'/Users/jdgleeson/.matplotlib'
>>> matplotlib.get_backend()
'MacOSX'

TkAgg.png showing expected results (via X11 on my Mac).

TkAgg

MacOSX.png shows incorrect results.

MacOSX

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

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