Goyo wrote: > 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') > ax.plot([1, 2, 3], [1, 2, 3]) > fig.savefig('test.jpg') > > But changing the dpi value has no effect so maybe I'm missing something.
The figure dpi is irrelevant when saving the figure; only the dpi specified in the savefig command matters for that. This is inherently confusing. I'm thinking about a solution, but haven't tried it yet. Eric ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users