我正在嘗試修改我已經制作的折線圖。在 x 軸上,它包含參與者完成任務的資料。但是,我正在嘗試使 x 軸簡單地將任務的每個完成會話顯示為第 1 天、第 2 天等......有沒有辦法做到這一點?
我的折線圖代碼如下:
ggplot(data = p07_points_scored, aes(x = day, y = total_score, group = 1))
geom_line()
geom_point()
theme(axis.text.x = element_text(angle = 60, vjust = 0.5))
labs(title=" P07s Total score on the training tool",
x = "Date of training completion",
y = "Total Score",
color = "lightblue")
geom_smooth()
進一步補充這一點。我有 4 個來自各個參與者的單獨折線圖,顯示他們在任務中的總分。有沒有辦法將單獨的圖表組合成 1?
非常感謝 :)
資料:
df <- structure(list(date = 19210:19240, y = c(2379.71407792736, 2349.90296535465,
2388.14396999868, 2266.84629740315, 2261.95099255488, 2270.90461436351,
2438.19569234793, 2132.6468717962, 2379.46892613664, 2406.13636097426,
2176.9392984643, 2219.0521150482, 2221.22674399102, 2399.82972150781,
2396.76276645913, 2233.62763324748, 2468.98833991591, 2397.47855248058,
2486.96828322353, 2330.04116860874, 2280.66624489061, 2411.09933781266,
2281.06682518505, 2281.63162850277, 2235.66952459084, 2271.2152525563,
2481.86164459452, 2544.25592495568, 2411.90218614317, 2275.60378793237,
2297.98843827031)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-31L))
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/522297.html
標籤:r线形图极值
上一篇:如何消除兩個圖例之間的巨大空間?
下一篇:如何為視圖設定域[Odoo15]
