add snippet for returnPallette

This commit is contained in:
dchakro 2023-09-19 13:41:08 -07:00
parent e344473f7d
commit 89a26f4af9

View file

@ -117,6 +117,11 @@ snippet ggtheme
${0} ${0}
snippet returnPalette
source('https://raw.githubusercontent.com/dchakro/shared_Rscripts/main/returnPalette.R')
colors <- returnPalette(ColorVariable = ${1:Variable}, GNE.colors = F, jumble = T)
${0}
snippet ggarea snippet ggarea
ggplot(data=${1:longDF}, aes(x=${2:orderedVar2}, y=${3:plottingValue})) + ggplot(data=${1:longDF}, aes(x=${2:orderedVar2}, y=${3:plottingValue})) +
geom_area(alpha=1, color="black", aes(fill=${4:fill.order}), position=position_fill(reverse = T)) + geom_area(alpha=1, color="black", aes(fill=${4:fill.order}), position=position_fill(reverse = T)) +