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.

______________________________________________
R-help@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.

Reply via email to