[R] the huge postscript plot
Yongchao Ge
gyc at stat.berkeley.edu
Sat Jul 5 09:06:15 CEST 2003
Hi Matt,
Thanks for the help. I'm just wondering if some package or some
options in par or ps.options exists so that I can just use it directly.
As we know, we can not just randomly sample 1000 of them as we may miss some
important extreme points (outliers). We need to define a small distance
d, when a clouds of points are within the distance of d,
then we can randomly sample a few points from each clouds so we don't
lose any visual information. What it really needs is a fast algorithm
to group 60,000 points into 1000+ of clusters. Each cluster's radius must
be less than d.
We can surely work this way. Again, let's go back to my original question,
I'd like to find a fast way to plot the points into a bitmapped (raster)
format, say 600x800. This is just an informal way of
the sampling strategy defined in the first graph and the radius d is
defined by the dimension size of the plot (600x800). The larger dimension
size, the smaller the radius d is.
If such package or options exists in R, please let me know as it can save
me enormous of time for the programming.
Yongchao
On Fri, 4 Jul 2003, Wiener, Matthew wrote:
> One possibility is to sample your 60,000 points, since you probably can't
> see them all distinctly anyway. You could sample, say, 10000 of them.
>
> Hope this helps,
>
> Matt Wiener
>
> -----Original Message-----
> From: Yongchao Ge [mailto:gyc at stat.berkeley.edu]
> Sent: Friday, July 04, 2003 7:06 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] the huge postscript plot
>
>
> Hi,
>
> I'm just wondering how I can do to make a huge postscript plot be
> manageable. My question is that I have to draw around 60,000 points which
> makes it painfully slow to print or view in gv or put it into latex
> document, though it is very fast to produce the postscript file.
>
> A simple example is in the attachment.
>
> Well, I found that if I use png or jpeg. It is much faster to view
> the figure. The only problem is that the x label, y label are using
> bitmapped font so it doesn't look as beautiful as postscript. Sometimes it
> is just hard to read the legend which consists of information how to
> interpret the figure.
>
> My question is that if there are some options or packages such that when
> we are plotting many points or lines, the plot uses the bitmapped (raster)
> format, but for the characters, like the x label, y label, and the title,
> it uses the native font.
>
> pdf seems use the above approach and is very fast, but I have to use
> pdf2ps to convert the pdf file to ps file. It is still slow. If you know
> other good converter of pdf file to ps file, i will also very appreciate
> it.
>
>
> Thanks,
>
> Yongchao
>
> x<-1:2000
> y<-matrix(rnorm(2000*12),2000,12)
> for(i in 1:12){
> y[,i]<-sort(y[,i]+i*0.5)
> }
> postscript("try.ps")
> matplot(x,y,type="l",lwd=5)
> dev.off()
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
> ------------------------------------------------------------------------------
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (Whitehouse Station, New Jersey,
> USA) that may be confidential, proprietary copyrighted and/or legally
> privileged, and is intended solely for the use of the individual or entity
> named on this message. If you are not the intended recipient, and
> have received this message in error, please immediately return this by
> e-mail and then delete it.
> ------------------------------------------------------------------------------
>
More information about the R-help
mailing list