Plotting options

So far in the examples presented, the display of the plots has been just the default one. Of course, there are multiple possibilities of customizing this. For the purpose of extension, only the following listed ones will be covered:

  • col: This is a string vector that defines the color. It can be written either as the color name (red, blue, and so on) or by its hexadecimal code. If the col argument has a vector shorter than the number of elements to plot, it will be recycled as explained in Chapter 2, First Steps towards Programming in R.
  • pch: This argument defines the shape of the points plotted. The different options are numerically coded. For a complete reference, visit http://www.endmemo.com/program/R/pchsymbols.php.

Consequently, ...

Get Learning Shiny now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.