[R] How to add a data line (series) to a plot using add=TRUE

stephen sefick ssefick at gmail.com
Tue Oct 28 23:04:52 CET 2008


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



More information about the R-help mailing list