Skip to content

PathoGenOmics-Lab/mycolorsTB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mycolorsTB

R Color package for Mycobacterium tuberculosis complex

Installation

You can install the released version of mycolorsTB from GitHub with:

install.packages("devtools")
devtools::install_github("PathoGenOmics-Lab/mycolorsTB")

Vector of colors

show(mycolorsTB::mycolors) #vector with lineage names
show(mycolorsTB::classicTB) #vector witout lineage names

Example - ggplot()

library(ggplot2)
library(mycolorsTB)

# Example data
data <- data.frame(
  x = 1:14,
  y = rnorm(14),
  group = rep(c(paste0("A", 1:4), paste0("L", 1:10)), each = 1)
)

# Fill: Plot with mycolors lineages names
ggplot(data, aes(x = x, y = y, fill = group)) +
  geom_bar(stat = "identity") + 
  scale_fill_mycolors() + # scale_fill_manual(values = mycolors)
  theme_minimal()

HEX codes

  • A1: #d1ae00
  • A2: #8ef5c8
  • A3: #73c2ff
  • A4: #ff9cdb
  • L1: #ff3091
  • L2: #001aff
  • L3: #8a0bd2
  • L4: #ff0000
  • L5: #995200
  • L6: #1eb040
  • L7: #fbff00
  • L8: #ff9d00
  • L9: #37ff30
  • L10: #8fbda1