On 2013/07/29 9:17 PM, Jeffrey Spencer wrote:
> I have three different versions of matplotlib that all output different
> file sizes with matplotlib 1.1.1 providing the smallest. This is for the
> same exact script. I can post the script if that helps.
>
> MPL 1.4.x: 539.32kb, Ubuntu 12.10
> MPL 1.1.1: 172.56kb Ubuntu 12.10
> MPL 1.2.1: 475.9kb, Ubuntu 13.04
>
> Is there a reason for this or why would such different file sizes be
> produced?? Also I tried using the matplotlib.use('cairo') with no
> difference. It actually says that the cairo backend is selected but the
> outputted pdf files show the matplotlib pdf backend was used.
>

I can't reproduce this failure to produce a pdf file with cairo.  With
mpl 1.4.x,

import matplotlib
matplotlib.use('cairo')
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.savefig("test.pdf")

The result is

efiring@manini3:~$ pdfinfo test.pdf
Creator:        cairo 1.10.2 (http://cairographics.org)
Producer:       cairo 1.10.2 (http://cairographics.org)
Tagged:         no
Pages:          1
Encrypted:      no
Page size:      576 x 432 pts
File size:      5261 bytes
Optimized:      no
PDF version:    1.5

Repeating but without specifying the cairo backend I get:

efiring@manini3:~$ pdfinfo test_default.pdf
Creator:        matplotlib 1.4.x, http://matplotlib.org
Producer:       matplotlib pdf backend
CreationDate:   Mon Jul 29 21:51:22 2013
Tagged:         no
Pages:          1
Encrypted:      no
Page size:      576 x 432 pts
File size:      5184 bytes
Optimized:      no
PDF version:    1.4

Eric

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to