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
############################## | |
# Gantt Chart ggplot code | |
############################## | |
setwd("Pathnamehere") | |
source('https://gist.githubusercontent.com/cherfychow/e9ae890fd16f4c86730748c067feee2b/raw/b2db138ab8164c237129308ea643de78cd54b252/cherulean.R') | |
require(dplyr) | |
require(ggplot2) | |
# timeline |
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
## Function if coordinates are ever in degree minutes seconds | |
# angle input can read these formats | |
# 00º 00" 00 | |
# 00 00 00 | |
# 00º00"00 | |
angle2dec <- function(angle) { | |
angle <- as.character(angle) | |
if (sum(str_detect(angle, '\\s*[:upper:]$')+0) > 0) { |
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
# Cherulean | |
# Custom palette functions for ggplot, bc hot plots | |
# Author: Cher Chow | |
# what do the palettes look like? https://iili.io/HE0wyb9.png | |
require(ggplot2) | |
## cherulean palettes set up |
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
# | |
# Function to implement BioTIME palettes as scales in ggplot | |
# Author: Cher Chow | |
# Updated December 2021 for fill visibility | |
require(ggplot2) | |
## BioTIME palettes set up | |
biotime_palettes <- list( | |
'realms4' = c("#155f49","#66c1d1","#d9d956","#d17538"), |