windrose_get_cols: Get Color Matrix and Legend for Windrose Plot

View source: R/windrose.R

windrose_get_colsR Documentation

Get Color Matrix and Legend for Windrose Plot

Description

The windrose method provides one windrose/wind count plot type. Based on the count matrix (windrose_get_counts) this function returns a matrix with hex colors (with alpha channel) and a data.frame used for the legend.

Usage

windrose_get_cols(x, col, p = 1, ncol = 50L)

Arguments

x

2-D matrix with counts (see windrose_get_counts).

col

single hex color, or a vector of hex colors. Alpha channel will be removed.

p

numeric value, power parameter for non-linear color transformation.

ncol

integer, if col is a single value the color will be repeated ncol times. Default is 50L.

Value

Returns a list with two elements: colormatrix of the same dimension as x with colors for the different bins based on the counts, and legend with levels and colors for the color legend of the plot.


retostauffer/Rfoehnix documentation built on June 5, 2023, 11:39 p.m.