Hi
I tried to use "weight" parameter to plot a weighted violin chart. However, in the following code, there is not difference between having "weight=V2" and not having that.
> library(ggplot2)
> mydata <- read.csv('test.csv', header=T,row.names=1)
> mydata
V1 V2 V3
P1 73.6 50 R
P2 75.2 20 R
P3 6.5 5 R
P4 41.4 10 C
P5 5.4 10 C
P6 18.8 5 C
> p <- ggplot(mydata, aes(x=V3, y=V1)) + geom_violin(trim=FALSE)
> p + geom_dotplot(binaxis='y', stackdir='center', dotsize=1)
`stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.
> p <- ggplot(mydata, aes(x=V3, y=V1), weight=V2) + geom_violin(trim=FALSE)
> p + geom_dotplot(binaxis='y', stackdir='center', dotsize=1)
`stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.
Did I miss something? It seems that "weight" has no effect.
Regards,
Mahmood