[R] Pdf file size for very scatter plots

Nazareno Andrade nazareno at gmail.com
Fri Aug 15 21:45:43 CEST 2008


Jim,

Thanks for the answer. Using pch="." reduces the file to ~3MB... Still large.

I'll look into hexbins, but if I understand it right, it would 'round'
points which are nearby into a same hexagon, right? Couldn't that
result in an inaccurate view of a scatter plot?

Here's the code I'm using:

pdf(); plot(rnorm(1e5), rnorm(1e5), pch = "."); dev.off()

thanks again,
Nazareno

On Fri, Aug 15, 2008 at 12:27 PM, jim holtman <jholtman at gmail.com> wrote:
> Have you tried using  pch='.'?
>
> Also you might consider using 'hexbin' for creating the scatter plot.
>
> On Fri, Aug 15, 2008 at 12:24 PM, Nazareno Andrade
> <nazareno at lsd.ufcg.edu.br> wrote:
>> Dear all,
>>
>> I am plotting a scatter plot for a large sample (1e+05 ordered pairs).
>> This produces a large (~5MB) file in a pdf or postscript terminal, and
>> I am wondering whether there are methods for reducing the size of the
>> resulting file so that it is easier to include it in a document. I'd
>> rather stick with pdf or ps as I am using latex.
>>
>> thanks,
>> Nazareno
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem that you are trying to solve?
>



More information about the R-help mailing list