Multiple emissions in ggplot & # 8594; alpha to outlier.color

I want my ejection points in the box to be translucent. In here! they used jitter (a similar idea, a different approach)

my code

ggplot() + 
geom_boxplot(aes(x = Sistema, y=values, linetype = Sistema), 
             data=estacado, outlier.size=1, outlier.shape=2) + 
coord_flip() + 
labs(x="Sistema", y=expression(paste("RMSD ",(ring(A))))) +
opts(legend.position="none")

my data

>head(estacado)
    values   ind Sistema
1 0.310214 r24_a     R24
2 0.428232 r24_a     R24
3 0.460971 r24_a     R24
4 0.482923 r24_a     R24
5 0.492656 r24_a     R24
6 0.515591 r24_a     R24
> tail(estacado)
          values   ind Sistema
4999995 1.723030 g24_e     G24
4999996 1.718444 g24_e     G24
4999997 1.720745 g24_e     G24
4999998 1.737137 g24_e     G24
4999999 1.733106 g24_e     G24
5000000 1.738487 g24_e     G24

http://dl.dropbox.com/u/19202810/Rplot01.png http://dl.dropbox.com/u/19202810/Rplot01.png

In the referenced link, they modified the function geom_boxplot; I was hoping for something lighter like outlier.colour= alpha("black", 1/2), but this gives an error:

Error in do.call("layer", list(mapping = mapping, data = data, stat = stat,  : 
  could not find function "alpha"

Any help is appreciated.

+3
source share
1 answer

Starting with version ggplot20.9.0, the function alphawas transferred to the package (then a new one) scales. To use it, you need to enable

library("scales")

in addition to

library("ggplot2")

in the script.

+4
source

All Articles