Re: [R] transparent grays?

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 31 Mar 2011 16:23:17 -0300

Try this:

with(trees, symbols(Height, Volume, circles=Girth/24, inches=FALSE, fg = "gray30",
 bg = sapply(apply(rbind(col2rgb(gray(seq(0,1, l = 10)))/255, alpha = 0.5), 2, as.list), do.call, what = rgb)))

On Thu, Mar 31, 2011 at 2:52 PM, Frostygoat <frostygoat_at_gmail.com> wrote:
> Is there a grayscale equivalent to alpha levels in rgb?
>
> Example:  I have the following to make red transparent circles overlap
> with previously plotted blue symbols.
>
> symbols(x=sites$long,y=sites$lat,circles=log(sites$prop.nem
> +1),add=T,inches=F,bg=rgb(red=1,green=0,blue=0,
> alpha=0.5),fg=rgb(red=1,green=0,blue=0, alpha=0.5))
>
> I'm having a hard time coming up with a grayscale equivalent.
>
> Thanks!
>
> ______________________________________________
> R-help_at_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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_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.
Received on Thu 31 Mar 2011 - 19:28:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Mar 2011 - 19:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive