我使用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绘制线条。
发布于 2019-01-16 23:56:54
numeric.x.axis参数就是为了这个目的!
ggline(df, x = "time", y = "len", numeric.x.axis = TRUE)

https://stackoverflow.com/questions/54220681
复制相似问题