Re: [R] "negative alpha" or custom gradient colors of data dots in...

2010-11-22 Thread madr
Well I "hacked" it i maybe not so elegant way: x <- rnorm(10) y <- rnorm(10) 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",

Re: [R] "negative alpha" or custom gradient colors of data dots in scatterplot ?

2010-11-22 Thread Ista Zahn
Hi, I suggest taking a look at the plotting functions in the ggplot2 package. For example: x <- rnorm(1) y <- x+rnorm(1) dat <- data.frame(x,y) library(ggplot2) p <- ggplot(dat, aes(x=x, y=y)) p + geom_point() # too much overplotting: compare to dev.new() p + geom_hex(binwidth=c(.1,.1))

[R] "negative alpha" or custom gradient colors of data dots in scatterplot ?

2010-11-21 Thread madr
I know that by setting alpha to for example col = rgb(0, 0, 0, 0.1) it is possible to see how many overlapping is in the plot. But disadvantage of it is that single points are barely visible on the background. So I wonder if there is possible to make setting that single points would be almost blac