MyNixOS website logo
Description

A Limnology Themed Palette Generator.

Palettes generated from limnology based field and laboratory photos. Palettes can be used to generate color values to be used in any functions that calls for a color (i.e. ggplot(), plot(), flextable(), etc.).

LimnoPalettes

Table of Contents

Code and general idea inspired by the “Wes Anderson Palettes” R-Package.

Citing package

citation('LimnoPalettes')
## 
## To cite package 'LimnoPalettes' in publications use:
## 
##   Paul Julian (2020). LimnoPalettes: A Limnology Themed Palette
##   Generator. R package version 0.1.0.
##   https://github.com/SwampThingPaul/LimnoPalettes
## 
## A BibTeX entry for LaTeX users is
## 
##   @Manual{,
##     title = {LimnoPalettes: A Limnology Themed Palette Generator},
##     author = {Paul Julian},
##     year = {2020},
##     note = {R package version 0.1.0},
##     url = {https://github.com/SwampThingPaul/LimnoPalettes},
##   }

Installation

install.packages("devtools");# if you do not have it installed on your PC
devtools::install_github("SwampThingPaul/LimnoPalettes")

Now Presenting…


Working Examples.

set.seed(1)
dat = data.frame(Group=c(rep("A",10),rep("B",10),rep("C",10),rep("D",10)),
                  var1=rnorm(40),var2=runif(40,1,15),var3=rpois(40,3))

cols = limno_palette("SuperIce",4)
boxplot(var2~Group,dat, col=cols)

cols = limno_palette("IowaSummer",4,"continuous")
cols2 = cols[dat$Group]
plot(var2~var3,dat,pch=21,bg=cols2,cex=2)

cols = limno_palette("PeriFA",4,"continuous")
barplot(aggregate(dat$var3,list(dat$Group),mean)$x,names.arg=unique(dat$Group),ylim=c(0,4),col=cols)

While not a part of this package, for data visualization purposes it would be a good idea to see how these colors are perceived for people with color blindness.

library(colorBlindness)
mat = matrix(1:81, nrow = 9, ncol = 9)

library(ggplot2)
library(reshape2)
cols = limno_palette("IowaSummer")

mat1 = melt(t(mat[9:1, ]))
len = length(cols)-1
mat1$v2 = cut(mat1$value,
              breaks = seq(0,ceiling(81/len)*len, 
                           length.out = len+1))
ht = ggplot(mat1) + 
  geom_tile(aes(x=Var1, y=Var2, fill=v2)) + 
  scale_fill_manual(values=cols) + 
  theme_bw()

# check the plot by CVD simulator
cvdPlot(ht)

# Second Example
cols = limno_palette("Bloom2",10, "continuous")

mat1 = melt(t(mat[9:1, ]))
len = length(cols)-1
mat1$v2 = cut(mat1$value,
              breaks = seq(0,ceiling(81/len)*len, 
                           length.out = len+1))
ht = ggplot(mat1) + 
  geom_tile(aes(x=Var1, y=Var2, fill=v2)) + 
  scale_fill_manual(values=cols) + 
  theme_bw()

# check the plot by CVD simulator
cvdPlot(ht)


Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows