我想使用 facet wrap 函式將我的結果分成兩個不同的圖,但是,我的代碼似乎給了我錯誤的圖,其中兩個不同的因素(基因型 PsbS 和 T259D)仍然顯示在圖中,盡管資料只有一個正在顯示(這可能聽起來令人困惑,請參閱我的情節)。謝謝!我的陰謀
RE <- read_csv("Cq.csv")
view(RE)
data.frame(RE)
ggplot(data=RE, mapping = aes(x = factor(genotype), y = cq, fill= line))
geom_bar(stat = "identity", position = "dodge")
geom_errorbar(data=RE, aes(ymin=cq-SEM, ymax=cq SEM), width=.2, position=position_dodge(width= 0.9))
theme_bw()
theme(text = element_text(size = 15))
facet_wrap(~genotype)
data.frame(RE)
id genotype line cq SEM
1 1 PsbS L1.1 14.870601010 5.4970515
2 2 PsbS L1.2 23.455655780 1.4763615
3 3 PsbS L1.3 14.004065480 0.8800974
4 4 PsbS L1.4 6.888686944 0.5056124
5 5 PsbS L1.5 8.986116514 0.9482289
6 6 PsbS L1.6 0.000703389 0.0000864
7 7 PsbS L1.7 11.422758140 0.3682201
8 8 PsbS L1.8 7.329694392 0.8226627
9 9 PsbS L1.9 6.795220106 0.7286420
10 10 T259D L3.3.1 20.549244950 1.6416835
11 11 T259D L3.3.2 24.979360100 4.5510392
12 12 T259D L3.3.3 25.089471950 3.4598942
uj5u.com熱心網友回復:
~ facet.wrap(~ 基因型, scales="free")
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/533307.html
上一篇:在R的ggplot2中使用geom點表示資料時出現問題。是否可以更改繪圖的邊距?
下一篇:如何更改R中閃避列的順序?
