[R] plot() function: color transparency

Duncan Murdoch murdoch.duncan at gmail.com
Wed Dec 18 20:22:45 CET 2013


On 13-12-18 2:08 PM, capricy gao wrote:
> I found all the color transparency was defined with character color, or rgb color. What if I have number code and still try to modify the transparency?
>
> For example:
>
>> x=c(1:5)
>> color=c(2,2,3,4,5)
>> plot(x, col=color)
>> plot(x, col=color,pch=20)
>
> here I defined color by numbers, how can I modify the transparency?

See the examples for ?palette.

Duncan Murdoch



More information about the R-help mailing list