我的圖中顯示的所有點除了一個之外,在顏色、大小和形狀方面的格式都是正確的。我無法弄清楚為什么這一點(見圖)與其他點不同。我查看了輸入資料,并沒有什么不尋常的地方,而且我使用相同的代碼塊來制作類似的數字,而不會發生這種情況。有什么建議?
這是代碼:
infil = ggplot(soil21, aes(x=Treatment, y=infil, col=Treatment))
geom_boxplot(fill='#f3f3f3', color="black")
geom_jitter(shape=19, size=1.75, position=position_jitter(0.2))
scale_color_manual(values=c("#0677B6", "#6AC7FA"))
ggtitle("Infil") ylab("Y axis")
theme(plot.title = element_text(size = 17))
theme(legend.position="bottom")
theme(legend.title=element_blank())
infil
uj5u.com熱心網友回復:
謝謝,這解決了它:
這是 geom_boxplot 添加的例外值。
geom_boxplot(..., outlier.shape = NA)
您可以通過添加例如- stefan來洗掉例外值
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/453831.html
上一篇:有沒有一種方法可以使用R計算4個不同的變數的SD重復
下一篇:移除區域最小值左右的資料