The attached script, run on svn mpl, illustrates a positioning problem:
note that the subplot titles are badly positioned in the 50 dpi version.
I believe that changing from 150 to 50 dpi should yield a perfect
scaling of everything in the plot, but it doesn't. There is a similar
problem with a quiver key positioned outside the axes frame, but I don't
have a trivial example yet; I am hoping that whatever solves the title
positioning problem will take care of that also. If not, I will make a
simple example and we can attack it separately.
I have made a first attempt to figure out the cause of the positioning
problem, and I have failed; I hope someone else will find it easier to
track down. I also find that following the chain of events involved in
savefig, and following the dpi setting, is rather difficult, and I
wonder whether it might be possible to clarify and simplify anything.
In any case, the dpi-related positioning bug (or bugs) is a significant
problem for me now.
Eric
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(2,1,1)
ax1.plot([1,2])
ax1.set_title('Top Plot')
ax2 = fig.add_subplot(2,1,2)
ax2.plot([1,2])
ax2.set_title('Bottom Plot')
fig.savefig('dpi150.png', dpi=150)
fig.savefig('dpi50.png', dpi=50)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel