> On Jun 22, 2018, at 12:12 PM, Ogbos Okike <giftedlife2...@gmail.com> wrote:
> 
> 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),

I don't think you understand the difference between character values and 
numeric values. Thr using 

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
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to