Skip to content

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

1 message · Michael R. Head

#
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?