1 - Create a plot legend without symbols.
Normally symbols and text are both used in a plot legend. In this example, legend entries are simply colour-coded without showing a corresponding symbol. This is particularly useful when many data points are plotted and only a summary legend is needed.
In the legend function, this can be done by supplying the term "NA" instead of a plotting symbol to the pch argument. A list of colors is then provided to the text.col argument.
Sample R command:
legend("topleft", legend=c("A","B","C","D"), pch=c(NA,NA,NA,NA), text.col=c("red","blue","green","orange"), bty="n")