私は ggplot2 を使用してデータをプロットしています。そのおもちゃの例を以下に示します。ggplot
ラベルをソートし、ソートされた順序でポイントをプロットするようです (最初に a、次に b、次に c)。 c.)。
これどうやってするの?
library(ggplot2)
tmp<- data.frame(testname=c("b","b","a","a","c","c"), variable=c(40,50,40,50,40,50), value=c(0.5,0.6,0.7,0.8, 0.4, 0.8))
tmp
> tmp
testname variable value
1 b 40 0.5
2 b 50 0.6
3 a 40 0.7
4 a 50 0.8
5 c 40 0.4
6 c 50 0.8
ggplot(tmp, aes(testname, value)) + geom_point(aes(group=variable, colour= variable), ) + theme_bw()