Daryl Herzmann, on 2011-01-21 15:42, wrote: > Greetings matplotlib users, > > Firstly, thank you so much for a great python plotting library. I use > it daily and find the library very intuitive :) My question deals > with generating raster images at multiple scales without heavy code > modification. My work flow is to generate two versions of the same > plot, one thumbnail (~ 320x320) and then one 'full size' around (~ > 800x800) in PNG format for the web. > > My current methodology is to generate a postscript file and then send > it through ImageMagick's convert to generate the two different sized > images. I find that this works 'good enough for me', but I often run > into problems when I have transparency in the plot and that > information is lost in the translation of formats... I also get > fairly bulky file sizes, but that is probably my fault for not using > the proper convert flags, anyway... > > I have tried messing around with the dpi and figsize settings to the > initial: fig = plt.figure() and fig.savefig() , but I can't seem to > get similiar quality to my hacky method outlined above. Many times, > the fonts look nasty :) > > Any tips or tricks to make this happen? Thanks again and I sincerely > apologize if I missed a FAQ item , etc on this...
Hi Daryl, I'm not sure I understand what it is that you want, but if the issue is related to scaling fonts depending on output figure size and/or dpi - have you tried playing around with the 'font.size' rcParam, and defining your font sized using 'xx-small', 'x-large', etc, instead of specifying a point size directly? From .matplotlibrc: # note that font.size controls default text sizes. To configure # special text sizes tick labels, axes, labels, title, etc, see the rc # settings for axes and ticks. Special text sizes can be defined # relative to font.size, using the following values: xx-small, x-small, # small, medium, large, x-large, xx-large, larger, or smaller #font.size : 12.0 I guess I'm not sure what you meant by the fonts looking 'nasty', so if font.size doesn't address your issue, could you post a small example that does the wrong thing, along with the type of output you were hoping to get. My feeling is that there shouldn't be a need to use ImageMagick - but depending on the size and dpi of your desired figures, is the problem that the text is not being antialiased? best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users