It's a bit of a pain:
xPix = 900
yPix = 600
xSize = 3 #inches
ySize = xSize/xPix*yPix
gcf().set_inches_size(xSize,ySize)
gcf().savefig('test.png',dpi=xSize/xPix)
You can also chance pyplot.rcParams - it's a dictionary of default values.
On 1/17/2012 12:10 PM, Keith Hughitt wrote:
I'd also be i
I'd also be interested if anyone has a suggestion for how to save a figure
such that the pixel dimensions of a subplot (e.g. an image) are set.
On Sat, Jan 14, 2012 at 8:57 AM, klo uo wrote:
> I browsed Google, and found mainly outdated code examples (also on scipy
> cookbook) then some 2008 pos