Description Usage Value Examples
View source: R/scale_color_phecode.R
Phecode color scale for ggplot2
1 |
ggplot2 color scale using category_colors()
colors for each category.
1 2 3 4 5 6 7 8 9 10 11 12 | library(dplyr)
library(ggplot2)
sample_n(phecode_descriptions, 300) %>%
left_join(category_colors(return_df = TRUE) %>%
mutate(bias = rnorm(n(), sd = 3)),
by = 'category') %>%
mutate(val = rnorm(n(), mean = bias)) %>%
ggplot(aes(x = phecode, y = val, color = category)) +
geom_point() +
scale_color_phecode() +
theme_phewas()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.