ggplot2 each group consists of only one observation

后端 未结 2 1785
说谎
说谎 2020-12-15 18:33

I am trying to plot the graph using ggplot2

So I have the following dataframe:

   iter        se perf name
1    V1 0.6463573 12.8    e
2    V2 0.3265         


        
相关标签:
2条回答
  • 2020-12-15 18:48

    You need to adjust the group aesthetic, replace :

       geom_line(position=pd) 
    

    by

      geom_line(position=pd,aes(group=name))
    

    enter image description here

    0 讨论(0)
  • 2020-12-15 18:52

    check whether the data type is factor by using is.factor(x), if it is TRUE, then use as.integer function.

    0 讨论(0)
提交回复
热议问题