[R] Plotting lines(...type="b", pch=1) vs. legend(pch=1)

Michael R. Head burner at suppressingfire.org
Wed Apr 1 09:10:43 CEST 2009


I'd like to do a lineplot with type="b" (both lines and points), opposed
to type="o" (points overplotted on lines). I'd like the legend to match
the line, with the point character plotted distinctly from the line, but
I can't figure out from the manual
( http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/legend.html ) which option to set on the legend() call.

Is there a way to get the legend to plot lines and point characters
without overplotting the character that I'm missing?

-- 
Michael R. Head <burner at suppressingfire.org>
http://www.cs.binghamton.edu/~mike/




More information about the R-help mailing list