[R] Differentiate values in a plot by colour or symbol
Tobias Christoph
s3tochri at uni-bayreuth.de
Tue May 30 18:02:28 CEST 2017
Hey Guys,
I just try to differentiate certain values in my plot by colour or symbol.
I have panel data with three dimensions (number of stations, revenue,
years). To integrate the third dimension (years) in the plot, I want to
differentiate the values(number of stations, revenue) by a certain range
of years.
e.g.: 2005-2010: red coloured dots, 2011-2016, blue coloured dots
For the normal plot I used the following formula:
*plot(data$stations, data$revenue, xlab="stations", ylab="revenue")*
I only found a way to mark every single year. So hopefully you can help?
Cheers,
Toby
[[alternative HTML version deleted]]
More information about the R-help
mailing list