Hi Jae-Joon,

I tried inserting:

mpl.rc('ps', usedistiller=None)

after importing matplotlib, and I get:

$ du -sk *.eps
6204    test_1.eps
34104   test_2.eps

using 'ghostscript' I get:

$ du -sk *.eps
34096   test_1.eps
34104   test_2.eps

and using 'xpdf' raises an exception:

 File 
"/Users/tom/Library/Python/2.6/site-packages/matplotlib/backends/backend_ps.py",
 line 1091, in _print_figure
    xpdf_distill(tmpfile, isEPSF, ptype=papertype, bbox=bbox)
  File 
"/Users/tom/Library/Python/2.6/site-packages/matplotlib/backends/backend_ps.py",
 line 1421, in xpdf_distill
    image.\nHere is the full report generated by pdftops: \n\n' + fh.read())
RuntimeError: pdftops was not able to process your image.
Here is the full report generated by pdftops: 

I don't have a matplotlibrc file, and I am using:

Ghostscript: GPL Ghostscript  9.00 (2010-09-14)
LaTeX: Version 3.1415926-1.40.10 (TeX Live 2009)

and I'm using the latest head from github for matplotlib.

Cheers,
Tom

On Mar 8, 2011, at 7:31 AM, Jae-Joon Lee wrote:

> With current master at git repo, I cannot reproduce this.
> Both test_1.eps and test_2.eps are ~4M in size.
> 
> Can you check if the file size varies significantly with rc parameters
> ps.usedistiller?
> I'm not sure how text setting can affect the images.
> 
> Regards,
> 
> -JJ
> 
> 
> 
> On Tue, Mar 1, 2011 at 7:23 AM, Thomas Robitaille
> <thomas.robitai...@gmail.com> wrote:
>> Hi,
>> 
>> In the following example:
>> 
>> ---
>> 
>> import numpy as np
>> 
>> import matplotlib as mpl
>> mpl.use('Agg')
>> import matplotlib.pyplot as plt
>> 
>> fig = plt.figure()
>> ax = fig.add_subplot(1, 1, 1)
>> ax.imshow(np.random.random((1024, 1024)), interpolation='nearest')
>> fig.savefig('test_1.eps')
>> 
>> mpl.rc('text', usetex=True)
>> 
>> fig = plt.figure()
>> ax = fig.add_subplot(1, 1, 1)
>> ax.imshow(np.random.random((1024, 1024)), interpolation='nearest')
>> fig.savefig('test_2.eps')
>> 
>> ---
>> 
>> the file test_2.eps is almost 6 times larger than test_1.eps, and takes much 
>> longer to draw. It looks like in the first case, the image is rendered as a 
>> bitmap (the way it should be), whereas in the second case each pixel is 
>> drawn individually as a polygon. Is this a bug?
>> 
>> I am using r8988 of matplotlib.
>> 
>> Thanks for any help!
>> 
>> Thomas
>> ------------------------------------------------------------------------------
>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
>> generated by your applications, servers and devices whether physical, virtual
>> or in the cloud. Deliver compliance at lower cost and gain new business
>> insights. http://p.sf.net/sfu/splunk-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to