reading PDFs
Oct. 29th, 2009 10:59 amDear LJ Genie,
Sometimes I make two-color scatterplots with o-shaped points. Occasionally, when I have a few thousand points, they bunch up and it really matters which color was plotted first: I can't see behind the color that was plotted last... except when Acrobat refreshes its window.
...which of course means it's possible to manipulate the elements of a PDF. But how?
Ideally, these points would be plotted at a random order (independent of color) AND would be semi-transparent. I'm not sure how to accomplish this easily with R's 'plot'.
Sometimes I make two-color scatterplots with o-shaped points. Occasionally, when I have a few thousand points, they bunch up and it really matters which color was plotted first: I can't see behind the color that was plotted last... except when Acrobat refreshes its window.
...which of course means it's possible to manipulate the elements of a PDF. But how?
Ideally, these points would be plotted at a random order (independent of color) AND would be semi-transparent. I'm not sure how to accomplish this easily with R's 'plot'.
(no subject)
Date: 2009-10-29 06:09 pm (UTC)(no subject)
Date: 2009-10-29 06:31 pm (UTC)My search term is now: PDF "vector graphics" library
(no subject)
Date: 2009-10-29 08:03 pm (UTC)If UBC has clusters you can use, they probably have Illustrator.
(no subject)
Date: 2009-10-29 08:34 pm (UTC)I'll need to work either via a library or the command line.
(no subject)
Date: 2009-10-29 09:16 pm (UTC)(no subject)
Date: 2009-10-29 09:21 pm (UTC)(no subject)
Date: 2009-10-30 12:41 am (UTC)(no subject)
Date: 2009-10-29 11:54 pm (UTC)(no subject)
Date: 2009-10-29 09:21 pm (UTC)(no subject)
Date: 2009-10-29 06:44 pm (UTC)(no subject)
Date: 2009-10-29 06:51 pm (UTC)(no subject)
Date: 2009-10-29 07:11 pm (UTC)R can do it
Date: 2009-10-30 05:35 am (UTC)1000 -> N
dat = data.frame(x=rnorm(N),y=rnorm(N),class=c(rep(1,N/2),rep(2,N/2)))
dat$col = ifelse(dat$class==1,"#ff000080","#0000ff80")
plot(dat$x,dat$y,col=dat$col,cex=2,lwd=5)
dat.rand = dat[sample(1:N,N),]
plot(dat.rand$x,dat.rand$y,col=dat.rand$col,cex=2,lwd=5)