我有一個包含三個因素的現有數據集。我想用facet_grid()來繪製這三個因子,並根據它們在數據集中的排序方式而不是按字母順序排序。這可能做某種方式而不修改我的數據結構?使用ggplot重新排列facet_wrap的等級
這裏的數據:
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
對不起,這是一個錯誤 – user1723765
你試過自己運行這個命令嗎?每個方面只有1個觀察。你知道嗎? – Arun