Thank you both for your fast replies.  (Just an aside, plotting all the points 
is a quick way to detect outliers.)

Before I sent the email, I tried to find a simple raster command in matplotlib 
to do just that (convert the image to raster), but I could not find one in my 
search.  Is there such a thing?

Thanks again.

c

----- Original Message -----
From: "Goyo" <goyod...@gmail.com>
To: "Christopher Kuhlman" <ckuhl...@vbi.vt.edu>
Cc: "matplotlib-users" <matplotlib-users@lists.sourceforge.net>
Sent: Saturday, March 22, 2014 4:11:08 PM
Subject: Re: [Matplotlib-users] how to reduce the file size of plots generated 
with matplotlib

2014-03-22 20:23 GMT+01:00 Christopher Kuhlman <ckuhl...@vbi.vt.edu>:
[...]
> For example, most recently, I am plotting 3 data sets; each data set has 
> about 90,000 points.  If I plot all three sets in one PDF figure, the file 
> size is over 2MB.
> This seems absurd to me.  I used R plotting for many years (again, my own 
> homegrown code, for 6 years) and never had this issue, and I was making these 
> kinds of plots/figures.
>
> I thought it may be a vector/raster issue, but the following web page says 
> that PDF are generated as vector image, which, to my understanding (which 
> could be wrong), is the more compact format.
> http://matplotlib.org/faq/usage_faq.html
[...]

Roughly speaking, size of vector files depend on the number of points
while size of raster files depends on the number of pixels. For your
use case (many points, small images) raster output should be more
compact.

Goyo

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to