我正在使用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")
我的时间标签等距。似乎lineplot将时间视为因子而不是连续变量。
有人知道如何纠正吗?我想使用ggpubr :: lineplot,因为它具有许多其他功能。我知道如何用ggplot绘制线条。