Skip to content

dracula/dRacula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

{dRacula} | Dracula Theme for R Dracula logo in an R hex sticker

R-CMD-check

All things Dracula themed for R

Install

All instructions can be found at draculatheme.com/R.

devtools::install_github("dracula/dRacula")

or

remotes::install_github("dracula/dRacula")

Examples

Add a Dracula-themed _brand.yaml to your project:

library(dRacula)
dracula_brand()

Dracula-branded Shiny App

Apply the Dracula theme and color scale to a linear regression plot:

library(dplyr)
library(ggplot2)
library(dRacula)

lm <- lm(mpg ~ wt, data = mtcars)

ggplot(mtcars %>% mutate(resid = abs(resid(lm)), fitted = fitted(lm))) +
  geom_line(aes(wt, fitted)) +
  geom_point(aes(wt, mpg, color = resid)) +
  scale_color_dracula(discrete = FALSE) +
  theme_dracula() +
  ggtitle("mtcars: MPG by Weight") +
  labs(x = "Weight", y = "MPG", color = "Residuals")

Apply the Dracula palette and theme to proportional stacked area chart:

library(dplyr)
library(ggplot2)
library(dRacula)

set.seed(1)
time <- rep(seq(1, 7), each = 5)
value <- runif(35, 10, 100)
group <- rep(LETTERS[1:5], times = 7)

data <- data.frame(time, value, group) %>%
  group_by(time, group) %>%
  summarise(n = sum(value), .groups = "drop") %>%
  mutate(percentage = n / sum(n))

ggplot(data, aes(x = time, y = percentage, fill = group)) +
  geom_area(alpha = 0.7, color = "black", linewidth = 0.4) +
  scale_fill_dracula(discrete = TRUE) +
  labs(
    title = "Proportional Stacked Area Chart",
    x = "Time",
    y = "Proportion",
    fill = "Group"
  ) +
  theme_dracula() +
  theme(legend.position = "bottom")

Team

This theme is maintained by the following person(s) and a bunch of awesome contributors.

Jordan Bradford
Jordan Bradford

Community

  • X - Best for getting updates about themes and new stuff.
  • GitHub - Best for asking questions and discussing issues.
  • Discord - Best for hanging out with the community.

Contributing

See CONTRIBUTING.md.

Acknowledgments

I’m indebted to the {viridis} and {wesanderson} R packages for inspiration and several plot examples.

License

MIT License

Contributors 4

  •  
  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy