scale_target | R Documentation |
creates a shape and size scale for plotting targets in ggplot2
scale_target(..., size = 2)
... |
arguments passed to discrete scale |
size |
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.