[R] "negative alpha" or custom gradient colors of data dots in...
madr
madrazel at interia.pl
Mon Nov 22 22:13:41 CET 2010
Well I "hacked" it i maybe not so elegant way:
x <- rnorm(100000)
y <- rnorm(100000)
png('out.png',width=600,height=500,units="px")
op <-
par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0),
tck = 0.01, mgp = c(0, -1.4, 0), xaxs = "i", yaxs = "i")
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='.',col =
rgb(1,1,1,1),yaxt="n", ann=FALSE)
# here is the solution - plot the same data with low alpha and different
color blue is best because is perceived as darkest
points(x,y,col = rgb(0,0,1,0.1),pch='.')
abline(h=0, lty=3, col="green")
abline(v=0, lty=3, col="green")
par <- op
http://i51.tinypic.com/maxmcl.png
[[repost, because subject was deleted and this message won't get into the
list]]
--
View this message in context: http://r.789695.n4.nabble.com/negative-alpha-or-custom-gradient-colors-of-data-dots-in-scatterplot-tp3052394p3054465.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list