Usage
color_palette_EGA(
name = c("polychrome", "blue.ridge1", "blue.ridge2", "rainbow", "rio", "itacare",
"grayscale"),
wc,
sorted = FALSE
)
Arguments
- name
Character. Name of color scheme (see
RColorBrewer
). Defaults to"polychrome"
.EGA
palettes:"polychrome"
— Default 40 color palette"grayscale"
— "grayscale", "greyscale", or "colorblind" will produce plots suitable for publication purposes"blue.ridge1"
— Palette inspired by the Blue Ridge Mountains"blue.ridge2"
— Second palette inspired by the Blue Ridge Mountains"rainbow"
— Rainbow colors. Default forqgraph
"rio"
— Palette inspired by Rio de Janiero, Brazil"itacare"
— Palette inspired by Itacare, Brazil
For custom colors, enter HEX codes for each dimension in a vector
- wc
Numeric vector. A vector representing the community (dimension) membership of each node in the network.
NA
values mean that the node was disconnected from the network- sorted
Boolean. Should colors be sorted by
wc
? Defaults toFALSE
See also
plot.EGAnet
for plot usage in EGAnet
Author
Hudson Golino <hfg9s at virginia.edu>, Alexander P. Christensen <alexpaulchristensen at gmail.com>
Examples
# Default
color_palette_EGA(name = "polychrome", wc = ega.wmt$wc)
#> [1] "#F03D2D" "#F03D2D" "#F03D2D" "#F03D2D" "#F03D2D" "#90DDF0" "#90DDF0"
#> [8] "#90DDF0" "#90DDF0" "#90DDF0" "#90DDF0" "#90DDF0" "#90DDF0" "#90DDF0"
#> [15] "#90DDF0" "#90DDF0" "#90DDF0" "#90DDF0"
# Blue Ridge Moutains 1
color_palette_EGA(name = "blue.ridge1", wc = ega.wmt$wc)
#> [1] "#272a39" "#272a39" "#272a39" "#272a39" "#272a39" "#24547e" "#24547e"
#> [8] "#24547e" "#24547e" "#24547e" "#24547e" "#24547e" "#24547e" "#24547e"
#> [15] "#24547e" "#24547e" "#24547e" "#24547e"
# Custom
color_palette_EGA(name = c("#7FD1B9", "#24547e"), wc = ega.wmt$wc)
#> #7FD1B9 #7FD1B9 #7FD1B9 #7FD1B9 #7FD1B9 #24547e #24547e #24547e
#> "#7FD1B9" "#7FD1B9" "#7FD1B9" "#7FD1B9" "#7FD1B9" "#24547e" "#24547e" "#24547e"
#> #24547e #24547e #24547e #24547e #24547e #24547e #24547e #24547e
#> "#24547e" "#24547e" "#24547e" "#24547e" "#24547e" "#24547e" "#24547e" "#24547e"
#> #24547e #24547e
#> "#24547e" "#24547e"