Created
March 11, 2022 18:57
-
-
Save topfunky/a7c5c53d6b56411a98bfcf96ae057841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As seen at https://topfunky.com/2021/ggplot-high-contrast-theme-gghighcontrast/ | |
foreground_color = "white" | |
background_color = "black" | |
ggplot(data, | |
aes( | |
x = year, | |
y = revenue, | |
group = product, | |
linetype = product | |
)) + | |
geom_line(color = foreground_color, | |
size = 1) + | |
theme_high_contrast( | |
foreground_color = foreground_color, | |
background_color = background_color | |
) + | |
theme(legend.position = "none") + | |
scale_linetype_high_contrast() + | |
labs(title = "CRT Sales, 1979-1982", | |
subtitle = "Non-GAAP, worldwide", | |
caption = "Data from example.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment