powered by
These functions are used for defining palettes or colors in the epicontacts package. They include:
epicontacts
transp(col, alpha = 0.5)edges_pal(n)cases_pal(n)spectral(n)fac2col(x, pal = cases_pal, NA_col = "lightgrey", legend = FALSE)
edges_pal(n)
cases_pal(n)
spectral(n)
fac2col(x, pal = cases_pal, NA_col = "lightgrey", legend = FALSE)
A color vector to which transparency should be added.
The threshold to be used for transparency: 0 for full transparency, and 1 for full opacity.
An integer indicating the number of colors.
A character or a factor to be converted to colors.
A color palette.
The color to be used for NA values.
A logical indicating if legend info should be added to the output. If TRUE, the output will be a list, with colors in the $color component.
$color
cases_pal: discrete color palette used for cases (comes from the dibbler package)
cases_pal
dibbler
spectral: continuous color palette (comes from the adegenet package)
spectral
adegenet
transp: makes colors transparent (comes from the adegenet package)
transp
fac2col: translates a character or a factor to a color using a palette (comes from the adegenet package)
fac2col
# NOT RUN { barplot(1:5, col = cases_pal(5)) barplot(1:50, col = cases_pal(50)) # }
Run the code above in your browser using DataLab