continuous value supplied to discrete scale

前端 未结 1 1426
天涯浪人
天涯浪人 2020-12-21 03:49

I am new to ggplot2. In fact, I only discovered it last week and I haven\'t quite figured out yet how to use aesthetics and scales etc. There is probably a very easy solutio

相关标签:
1条回答
  • 2020-12-21 04:15

    Vc should be a factor if you want two values in the legend. You were getting that error because you were trying to scale Vc as discrete (breaks = c(30, 40)) when it was of type integer

    ggplot(dadosc, aes(x=Lu, y=Fres, colour=factor(Vc))) +
       ...
    

    enter image description here

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