[R] as.Date and Legend in a plot
Ogbos Okike
giftedlife2014 @ending from gm@il@com
Fri Jun 22 21:12:45 CEST 2018
Dear Contributors,
I am surprised that I cannot add legend to a certain plot. Although the
x-axis indicates years, the actual data was in year, month and day format.
I then used as.Date to play around and get what I am looking for. I am,
however, worried that I cannot add legend to the plot no matter how I
tried. Looking at the axis, I tried:
legend(1998,3, c("Climax", "Thule", "Sopo"), lty = 1, col =
c("black","red","blue")). I also tried:
legend(as.Date(1998-02-10),3, c("Climax", "Thule", "Sopo"), lty = 1, col =
c("black","red","blue"))
but no result and no error.
I have attached the plot in case it will assist in your suggestions.
Many thanks for your time.
Ogbos
More information about the R-help
mailing list