This function can be used to generate a palette of colors useful to plot functional datasets with the plot methods.

fDColorPalette(N, hue_range = c(0, 360), alpha = 0.8, ...)

Arguments

N

number of different colors (ideally, functional observations).

hue_range

the range of hues in the HCL scheme.

alpha

the alpha channel parameter(s) of the colors (transparency).

...

additional parameters to be passed to scales::hue_pal

Details

The function, built around scales::hue_pal, allows to set up the HCL parameters of the set of colors desired, and besides to set up the alpha channel value.

Examples


N = 1e2
angular_grid = seq( 0, 359, length.out = N )

dev.new()
plot( angular_grid, angular_grid,
      col = fDColorPalette( N, hue_range = c( 0, 359 ), alpha = 1 ),
      pch = 16, cex = 3 )