next up previous
Next: About this document ... Up: Producing Graphics in S-PLUS Previous: Multiple Plots per Page

Using Color

Most plotting functions have a col= field, allowing you to select a color or colors for a plot. This field takes a numeric argument and selects the matching color from the active color scheme. For lines in the ``white on black'' (default) color scheme, 0 is black and 1 is white. You can edit the color scheme (via the menu in the graphics window) and add some more colors. For instance, if you wrote ``red'' and ``yellow'' after ``white'' on the list of colors for lines, abline(a,b,col=2) would produce a red line and abline(a,b,col=3) would produce a yellow line.



Brian Junker 2002-08-26