>>>>> "Benoit" == Benoit Donnet <[EMAIL PROTECTED]> writes:
Benoit> Hi, First of all, I'd like to thank matplotlib developers Benoit> for providing us this wonderful library. Benoit> It's been a while now I'm using matplotlib and I'm pretty Benoit> happy with it. I used to be a Linux user. Recently, I Benoit> moved to Mac (a macbook pro, to be precise). I succeed to Benoit> install matplotlib. Everything is working correctly Benoit> except the export of figures into eps format (which is Benoit> important when writing papers with LaTeX). Benoit> When I'm trying to save a figure in eps, everything seems Benoit> ok. However, it is impossible to open the eps file. The Benoit> eps seems to be corrupted. A closer look at the eps file Benoit> shows that the generated file is 'heavy', i.e., several MB Benoit> (around 6MB on average). Note that other output formats Benoit> are correctly generated. Benoit> I don't really understand the source of the problem. Benoit> Probably something that is misconfigured. If somebody has Benoit> an idea on how to solve this problem, it would be great. I am 99% sure this is a font problem. matplotlib embeds the truetype font into the PS file, which accounts for most of the file size. Paul Barrett at one point looked into just embedding he glyphs we use rather than the entire font file but was unsuccessful. It would be nice if some font guru could revisit this issue at some point since it would be a big win in terms of file size. What appears to be happening is that mpl is finding and using a native os x font rather than the Vera fonts that mpl ships with. Try editing your matplotlib rc file and change these font preferences font.serif : New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Bitstream Vera Serif, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif font.sans-serif : Lucida Grande, Verdana, Geneva, Lucida, Bitstream Vera Sans, Arial, Helvetica, Avant Garde, sans-serif font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace by moving the bitstream fonts to the front. I'm inclined to make the bitstream fonts the default (the first item in the default rc list) so that others won't be bitten by this until we solve the "dump the entire font" problem. Any objections? Benoit, please let us know if this fixes your problem. After changing the rc file, please recursively remove ~/.matplotlib/ttffont.cache before rerunning. Also, if you run your script with --verbose-debug you will get information about which fonts are loaded. JDH Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users