[Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Jesper Larsen
Hi matplotlib-users, I decided to try to make some plots that I have previously made in png format using the Agg backend in jpeg format using the GTKAgg backend (which I guess is the one I should use for this). Unfortunately my script exits with an error. I have therefore created a simple test

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Goyo
I can't make much sense of this. You don't plot anything and don't use canvas. This code works: import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot pyplot.plot([0, 1, 2, 3], [0, 1, 2, 3]) fig = pyplot.gcf() fig.savefig('test.jpg') But I don't know how to set the dpi value

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Eric Firing
Goyo wrote: I can't make much sense of this. You don't plot anything and don't use canvas. This code works: import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot pyplot.plot([0, 1, 2, 3], [0, 1, 2, 3]) fig = pyplot.gcf() fig.savefig('test.jpg')

Re: [Matplotlib-users] GTKAgg throwing an exception

2008-10-12 Thread Goyo
El lun, 13-10-2008 a las 00:41 +0200, Goyo escribió: But I don't know how to set the dpi value this way. I tried to use the OO API but no success. Well yes... import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot fig = pyplot.figure(dpi=100) ax = fig.add_subplot('111')