y轴中有多个列值

时间:2017-11-07 12:45:06

标签: r ggplot2

我试图使用ggplot将数据下面的数据绘制为线条。该表如下所示:

number total_leaf_cells standard_cells moveable_cells 
    1   exp1            64886          63591          63591      
    2   exp2            64856          63561          63561       
    3   exp3            64919          63624          63624      
    4   exp4            64862          63567          63567       
    5   exp5            64936          63641          63641   

我的代码是:

ggplot() + 
      geom_point(data = my_data, aes(x = number, y = total_leaf_cells), color = "red") +
      geom_point(data = my_data, aes(x = number, y = moveable_cells), color = "blue") 

我收到了以下错误:

  

geom_path:每组只包含一个观察。你需要调整群体审美吗?

如何将total_leaf_cells,standard_cells,moveable_cells绘制为y轴值,将数字绘制为x轴?

0 个答案:

没有答案
相关问题