R ggplot2: legend should be discrete and not continuous

后端 未结 1 1626
轻奢々
轻奢々 2020-12-05 15:42

I have the following data:

benchmark   mispredpenal    IPC     pred
ammp        1               1.0589  2lev
ammp        5               1.0450  2lev
...


        
相关标签:
1条回答
  • 2020-12-05 16:15

    You want the variable mispredpenal to be a factor in that case:

    ggplot(IPC, aes(x = benchmark, y = IPC, group=factor(mispredpenal), colour=factor(mispredpenal))) + 
      geom_point() + geom_line()
    
    0 讨论(0)
提交回复
热议问题