Mark Na
2008-Oct-28 19:49 UTC
[R] How to add a data line (series) to a plot using add=TRUE
Hello, I'd like to use the add=TRUE parameter to add a second data line (series) to an existing plot, but R is giving me an error (see below). This code: > rap<-plot(aspen_sort,ylim=c(1,10000),log="y") ...produces the plot to which I'd like to add the second line. But this code: > rap<-plot(pine_sort,add = TRUE) ...produces this error: Warning messages: 1: In plot.window(...) : "add" is not a graphical parameter 2: In plot.xy(xy, type, ...) : "add" is not a graphical parameter 3: In axis(side = side, at = at, labels = labels, ...) : "add" is not a graphical parameter 4: In axis(side = side, at = at, labels = labels, ...) : "add" is not a graphical parameter 5: In box(...) : "add" is not a graphical parameter 6: In title(...) : "add" is not a graphical parameter I have successfully used add=TRUE (in the same program!) with no errors, so I reckon the problem must be related to my data structures, but I can't see how. Any ideas? Thanks! Mark
stephen sefick
2008-Oct-28 22:04 UTC
[R] How to add a data line (series) to a plot using add=TRUE
add is not a graphical parameter On Tue, Oct 28, 2008 at 3:49 PM, Mark Na <mtb954 at gmail.com> wrote:> Hello, > > I'd like to use the add=TRUE parameter to add a second data line (series) to > an existing plot, but R is giving me an error (see below). >try (untested): plot(aspen_sort,ylim=c(1,10000),log="y") lines(pine_sort)> > ...produces this error: > > Warning messages: > 1: In plot.window(...) : "add" is not a graphical parameter > 2: In plot.xy(xy, type, ...) : "add" is not a graphical parameter > 3: In axis(side = side, at = at, labels = labels, ...) : > "add" is not a graphical parameter > 4: In axis(side = side, at = at, labels = labels, ...) : > "add" is not a graphical parameter > 5: In box(...) : "add" is not a graphical parameter > 6: In title(...) : "add" is not a graphical parameter > > I have successfully used add=TRUE (in the same program!) with no errors, so > I reckon the problem must be related to my data structures, but I can't see > how. > > Any ideas? Thanks! > > Mark > > ______________________________________________ > R-help at r-project.org mailing list > 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. >-- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
Apparently Analagous Threads
- Plotting more than one series on the same graph
- Sorting alphanumerically
- SMBTorture tests on HP UX IA64 - Samba 4.5.3 without AD DC
- Samba 3.0.9/10, missing 'net rap printq list' on HP-UX?
- How to translate a dataframe into the R code that makes that dataframe?