我有一个包含三个因素的现有数据集。我想使用facet_grid()绘制这三个因素,并按照它们在数据集中的顺序进行排序,而不是按字母顺序排序。是否可以在不修改数据结构的情况下实现这一点?
以下是数据:
以下是数据:
https://dl.dropboxusercontent.com/u/22681355/data.csv
data<-read.csv("data.csv", head=T)
ggplot(data, aes(time,a, color="one")) +
geom_line(linetype=1, size=0.3) +
scale_y_continuous(breaks=seq(0,1,0.2)) +
scale_x_continuous(breaks=seq(100,300,50)) +
theme_bw() +
geom_line(aes(time,b)) +
geom_line(aes(time,c)) +
geom_line(aes(time,d))+facet_wrap(~X.1)
data
中获取net
? - Arun