Hi,
I am using the matplotlib library that comes with Ubuntu 7.04. This is
version 0.87.7 with ESP ghostscript 8.15.4.
I am trying to produce a very simple EPS figure, but the EPS file is
different than what I see on the screen in the GTKAgg window, or when
I save the figure as a PNG file. It looks like the coordinate system
in the PS case is different, and so the objects in the figure are
placed in different locations.
The code that I am using is:
import matplotlib
from pylab import *
from matplotlib.patches import Ellipse
from matplotlib.text import Text
xy1=(0.38,0.52)
xy2=(0.5,0.5)
e1 = Ellipse(xy=xy1, width=1e-1, height=3e-1, \
angle=30.0, linewidth=2, fill=False)
e2 = Ellipse(xy=xy2, width=1e-1, height=3e-1, \
angle=-30, linewidth=2, fill=False)
ax=gca()
ax.add_artist(e1)
ax.add_artist(e2)
axis('off')
savefig('ellipse.eps')
savefig('ellipse.png')
If you run it and view the two files ellipse.eps and ellipse.png -
you'll notice they look different. In the PNG file the ellipses
intersect, but in the EPS file they don't.
What's wrong here?
Thanks,
Itai.