Skip to contents

creates a shape and size scale for plotting targets in ggplot2

Usage

scale_target(..., size = 2)

Arguments

...

arguments passed to discrete scale

size

the size of the shapes

Examples

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()