Saturday, 15 February 2014

plot - Produce a legend in R -


In RI often add legends in my plots like this

  legend ("top However, what I have to do is create a plot, "C" ("a = 1", "b = 1"), lwd = c (1,2))  

In which nothing other than that legend How do I do this? (Such as using a package like ggplot)

You can use a new, empty plot Frame can be created () or plot.new ()

  plot.new () legend ("top", c ("a = 1", "b = 1"), lwd = C (1,2))  

No comments:

Post a Comment