From: David Warde-F. <dw...@cs...> - 2008-09-06 06:07:11
|
On 4-Sep-08, at 10:03 PM, Josh Lawrence wrote: > Hey all, > > When I plot using python 2.5.2 and matplotlib 0.98.3 (and 0.98.1) I > have the following problem. If I run a script from the command line > that plots and saves the figure, I get the default aspect ratio of (8, > 6). If, however, I close the plotting window and replot without > exiting the python prompt and starting anew, the aspect changes to > something like (8, 6.04). I can reliably get the (8, 6) aspect ratio > if I quit the python prompt and load a new prompt. The problem only > comes after I close the plot window and replot. I just attempted to reproduce your problem with 0.98.3 and couldn't; I managed to get identical screenshots after closing the window and replotting. Several things you could tell us that might help isolate the problem: - What GUI backend? TkAgg I'm assuming? If you're unsure, import matplotlib and use the matplotlib.get_backend() function. - What plotting commands are you using? - Does the aspect ratio change if you do something simple like, say, import numpy from pylab import * x = numpy.randn(50,50) imshow(x) (close window) imshow(x) import numpy from pylab import * x = numpy.arange(1,10) plot(x, x**2) (close window) plot(x,x**2) Neither of these lead to an aspect ratio shift for me, on OS X 10.5 with the TkAgg backend, same version of matplotlib. David |