缺少 x 值的 ggplot 散点图,趋势线不会连接

我是 R 新手,我正在尝试使用 ggplot2 将一些数据绘制为散点图。我的样本中缺少一天,我制作的趋势线无法将所有数据连接在一起。下面是我的代码和图表的样子。

ggplot(SiExptTEPa,aes(x=Timepoint..dpi.,y=(TEPcells),group=(Treatment))) +
    geom_point(size=5,aes(colour=Nutrient)) +
    scale_color_manual(values=c('yellow','light blue')) +
    geom_errorbar(aes(ymin=TEPcells-se,ymax=TEPcells+se),width=.1) +
    facet_wrap(~Nutrient,scales="free") +
    scale_y_continuous(labels = scientific) +
    theme_classic() +
    xlab("Time Post Infection (Days)") +
    ylab("TEP by Total Cells") +
    ylim(3e-08,2e-07) +
    geom_line(aes(linetype=Treatment)) +
    scale_linetype_manual(values=c("solid","dashed"))

Incorrect graph

请告诉我如何连接图形两侧中间的间隙,使之成为一条连续的线?

nb_sky 回答:缺少 x 值的 ggplot 散点图,趋势线不会连接

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/4057.html

大家都在问