subset for a given ggplot2 layer

## Settings for RMarkdown http://yihui.name/knitr/options#chunk_options
opts_chunk$set(comment = "", warning = FALSE, message = FALSE, echo = TRUE, 
    tidy = FALSE, fig.width = 7, fig.height = 7)
options(width = 116, scipen = 10)
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
    geom_point(data = subset(iris, Species %in% c("setosa","virginica")))

plot of chunk unnamed-chunk-2