Hi,
The following code displays a figure with both a red and a blue arrow
(generated by annotate). But the pdf that is saved only shows the red
one. It seems that the line ax1.set_xscale('log') is causing the
trouble, because if it is commented out, the blue arrow reappears in the
pdf. Any hints?
import numpy as np
from matplotlib import pyplot as pp
fig = pp.figure()
ax2 = fig.add_subplot(111)
ax1 = ax2.twinx()
ax1.set_xlim(xmin=100,xmax=10000)
ax1.set_ylim(ymin=-60, ymax=5)
ax1.set_xscale('log')
ax2.set_xlim(xmin=100,xmax=10000)
ax2.set_ylim(ymin=-5,ymax=35)
ax2.set_xscale('log')
ax1.annotate("", (10000,-30), (2000,-30),
arrowprops=dict(arrowstyle="-|>",fc="b", ec="b"))
ax2.annotate("", (100, 5), (2000, 5),
arrowprops=dict(arrowstyle="-|>",fc="r", ec="r"))
pp.savefig('test_arrow.pdf')
pp.show()
--
Christopher Brown, Ph.D.
Associate Research Professor
Department of Speech and Hearing Science
Arizona State University
http://pal.asu.edu
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users