olink_fill_discrete | R Documentation |
Olink fill scale for discrete ggplots
olink_fill_discrete(..., alpha = 1, coloroption = NULL)
... |
Optional. Additional arguments to pass to ggplot2::discrete_scale() |
alpha |
transparency (optional) |
coloroption |
string, one or more of the following: c('red', 'orange', 'yellow', 'green', 'teal', 'turqoise', 'lightblue', 'darkblue', 'purple', 'pink') |
No return value, called for side effects
library(ggplot2)
dsub <- subset(diamonds, x > 5 & x < 6 & y > 5 & y < 6)
dsub$diff <- with(dsub, sqrt(abs(x-y))* sign(x-y))
ggplot(dsub, aes(x, y, colour=diff)) +
geom_point() +
theme_bw() +
olink_fill_discrete()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.