R/scale_target.R
scale_target.Rd
creates a shape and size scale for plotting targets in ggplot2
scale_target(..., size = 2)
arguments passed to discrete scale
the size of the shapes
library(ggplot2) data.frame(x = rnorm(20), y = rnorm(20), z= factor(c(rep(1, 15), rep(2, 5)))) %>% ggplot(aes(x = x, y = y, shape = z, size = z, color = z)) + scale_target() + geom_point()