0

I have a very simple question. I want to ggplot several variables by date. No groups, no factors. And add a legend. Can I do this? Thanks

Consulted many websites, could find no legends without groups. Can do with base R very easily, I think I should be able to do it in ggplot2

Allan Cameron
  • 147,086
  • 7
  • 49
  • 87
wyoronk
  • 1
  • 1
  • 2
    Welcome to SO! The general answer is yes but perhaps you have to reshape your data. For more help I would suggest to provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including at least a snippet of your data or some fake data. – stefan Dec 01 '22 at 21:07
  • See, for instance, [here](https://stackoverflow.com/questions/3777174/plotting-two-variables-as-lines-using-ggplot2-on-the-same-graph). – Rui Barradas Dec 01 '22 at 21:58

0 Answers0