Skip to content

For when your colors absolutely should not be excluded from the narrative.

License

Notifications You must be signed in to change notification settings

johnmbf/tayloRswift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tayloRswift

A ggplot2 color palette based on Taylor Swift Album Covers.

Installation

You can install the released version of tayloRswift with:

remotes::install_github("tayloRswift")

Swift up your graphs with Taylor Swift palettes.

Color by discrete variable using default palette based on 1989

ggplot(penguins, aes(bill_depth_mm, bill_length_mm, color = species)) +
  geom_point(size = 4) +
  scale_color_taylor()+
  theme_minimal()

Choose a different palette

Reputation works great as a grayscale.

ggplot(penguins, aes(bill_depth_mm, bill_length_mm, color = species)) +
  geom_point(size = 4) +
  scale_color_taylor(palette = "reputation")+
  theme_minimal()

Color by numeric variable

ggplot(penguins , aes(bill_depth_mm, bill_length_mm,color = bill_length_mm)) +
  geom_point(size = 4, alpha = .6) +
  scale_color_taylor(discrete = FALSE)+
  theme_minimal()

Fill by discrete variable

ggplot(penguins, aes(species, fill = species)) +
  geom_bar() +
  theme_minimal()+
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_fill_taylor(palette = "speakNow", guide = "none")

If you prefer the live recording

ggplot(penguins, aes(species, fill = species)) +
  geom_bar() +
  theme_minimal()+
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_fill_taylor(palette = "speakNowLive", guide = "none")

About

For when your colors absolutely should not be excluded from the narrative.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%