使用 ggpubr::lineplot 的连续 x 轴问题

issues with continuous x axis using ggpubr::lineplot

我正在使用 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 绘制线条。

numeric.x.axis 论点正是为此!

ggline(df, x = "time", y = "len", numeric.x.axis = TRUE)