This functions implements a scatterplot method for
`factor`

arguments of the *generic*
`plot`

function.

If `y`

is missing `barplot`

is produced.
For numeric `y`

a `boxplot`

is used, and for a factor
`y`

a `spineplot`

is shown. For any other type of
`y`

the next `plot`

method is called, normally
`plot.default`

.

1 2 |

`x, y` |
numeric or factor. |

`legend.text` |
character vector for annotation of y axis in the
case of a factor |

`...` |
Further arguments to |

`plot.default`

, `plot.formula`

,
`barplot`

, `boxplot`

, `spineplot`

.

1 2 3 4 5 6 7 8 9 10 | ```
require(grDevices)
plot(weight ~ group, data = PlantGrowth) # numeric vector ~ factor
plot(cut(weight, 2) ~ group, data = PlantGrowth) # factor ~ factor
## passing "..." to spineplot() eventually:
plot(cut(weight, 3) ~ group, data = PlantGrowth,
col = hcl(c(0, 120, 240), 50, 70))
plot(PlantGrowth$group, axes = FALSE, main = "no axes") # extremely silly
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.