8000 savefig() changes angles parameter of quiver plot · Issue #625 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
savefig() changes angles parameter of quiver plot #625
Closed
@ptomato

Description

@ptomato

I'm using matplotlib 1.0.1. Run the following with bug = True and bug = False:

import numpy as N
from matplotlib import pyplot as P

x = N.linspace(0, 1, 10)
y = N.linspace(0, 1, 10)
angles = N.linspace(0, 360, 10)
angles_copy = angles.copy()

P.quiver(x, y, 1, 0, angles=angles)

if bug:
    P.savefig('bug.pdf')

print 'array unchanged:', (angles == angles_copy).all()

P.show()

The array is unchanged and the plot shows correctly if savefig() is not called. If it is, then the angles array is changed; numpy.degrees() is run on it, and the plot shows up with arrows at incorrect angles. However, the arrows are correctly rendered in the PDF file.

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

      0