我正在使用 ggpubr::lineplot 绘制线图。我的 x 轴是连续变量。
df <- data.frame(time=c(1, 5, 20),
len=c(4.2, 10, 29.5))
library(ggpubr)
ggline(df, x = "time", y = "len")
我的时间标签是等距的。似乎线图将时间视为因子而不是连续变量。
有谁知道如何纠正?我想使用 ggpubr::lineplot 因为它还有许多其他功能。我知道如何只用 ggplot 绘制线条。