Annotations appear in incorrect locations #1588

Closed
mdehoon opened this Issue Dec 11, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

mdehoon commented Dec 11, 2012

The demo scripts for annotations in examples/pylab_examples seem to draw a figure with the annotation labels in incorrect locations. The same problem appears in the Mac OS X backend, the gtkagg backend, and the PNG backend. Attached is an example from annotation_demo2.py, showing the PNG generated by savefig("test.png"). The label locations do not seem correct.
test

Member

pelson commented Dec 11, 2012

Very odd.

I think your referring to http://matplotlib.org/examples/pylab_examples/annotation_demo2.html? This works for me on master with the TkAgg and Agg backends (I presume this is the png backend you mean?).

Is this on OSX and built with master?

Owner

mdboom commented Dec 11, 2012

Are you doing anything additional to the example (i.e. zooming in?) The axis scales suggest not to me, but I'm unable to reproduce this as well, so I'm not sure what might be going wrong.

Contributor

mdehoon commented Dec 12, 2012

Indeed I meant the Agg backend; at least it looks like Agg is used to create the png file. But I am getting the same error with the PDF backend. If I add these lines to the top of annotation_demo2.py:

import matplotlib
matplotlib.use("pdf")
matplotlib.interactive(False)
from matplotlib.pyplot import savefig

and this line instead of the show() at the end of the script:

savefig("test.pdf")

then the test.pdf file shows the same problem. I did not make any other changes to the script.
This is on Mac OS X, built from master.

I have seen the same bug a week or two ago with the Cairo backend, but I didn't investigate further at the time.

Member

pelson commented Dec 28, 2012

Closed by #1620 it would seem.

pelson closed this Dec 28, 2012

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