PrepareColors: Generates vectors of colors for use by CChart. Wrapper for...

View source: R/preparecolors.R

PrepareColorsR Documentation

Generates vectors of colors for use by CChart. Wrapper for GetNumColors and ChartColors.

Description

Generates vectors of colors for use by CChart. Wrapper for GetNumColors and ChartColors.

Usage

PrepareColors(
  dat,
  chart.type,
  small.multiples = FALSE,
  multi.color.series = FALSE,
  scatter.colors.column = 4,
  palette = NULL,
  palette.custom.color = NULL,
  palette.custom.gradient.start = NULL,
  palette.custom.gradient.end = NULL,
  palette.custom.palette = NULL,
  fit.palette = NULL,
  fit.palette.custom.color = NULL,
  fit.palette.custom.gradient.start = NULL,
  fit.palette.custom.gradient.end = NULL,
  fit.palette.custom.palette = NULL,
  fit.CI.palette = NULL,
  fit.CI.palette.custom.color = NULL,
  fit.CI.palette.custom.gradient.start = NULL,
  fit.CI.palette.custom.gradient.end = NULL,
  fit.CI.palette.custom.palette = NULL,
  subslice.palette = NULL,
  subslice.palette.custom.color = NULL,
  subslice.palette.custom.gradient.start = NULL,
  subslice.palette.custom.gradient.end = NULL,
  subslice.palette.custom.palette = NULL
)

Arguments

dat

The data to be plotted, from which the number of required colors are deduced.

chart.type

The name of plot to create.

small.multiples

Whether the chart is shown as small multiples.i

multi.color.series

Logical; Indicates whether multiple colors will be shown in a Bar or Column chart with a single series. By default this is off and different colors are used to distinguish between different series. However, when chart.type is "Pyramid", then multi.color.series is always true.

scatter.colors.column

For scatterplot data, the column of data which is used to determine the colors of each point.

palette

Specifies the color vector to be used for the chart data. It can be (1) A named palette from grDevices, RColorBrewer colorspace, or colorRamps; or (2) A vector of colors which will be recycled to the length of the number of colors needed; or (3) one of "Custom color", "Custom gradient" or "Custom palette". The last option gives the user greater control via additional parameters (see below). If not specified, the colors used are c("#5C9AD3", "#ED7D31", "#A5A5A5", "#FFC000", "#4473C5", "#70AD46", "#255F91", "#9E480D", "#636365", "#987300", "#26408B", "#42682B")

palette.custom.color

A single color provided as a hex or character string. Only used if palette is "Custom color". The output vector will consist of palette repeated for the number of required colors.

palette.custom.gradient.start

A color specifying the start of the gradient when palette is set to "Custom gradient".

palette.custom.gradient.end

A color specifying the end of the gradient when palette is set to "Custom gradient".

palette.custom.palette

A vector or comma separated list of colors which will be recycled to the desired length. Only used if palette is "Custom palette".

fit.palette

As per palette except for the chart fit lines (trendlines). An additional option is "Group colors", which uses the colors from palette.

fit.palette.custom.color

As per palette.custom.color.

fit.palette.custom.gradient.start

As per palette.custom.gradient.start.

fit.palette.custom.gradient.end

As per palette.custom.gradient.end.

fit.palette.custom.palette

As per palette.custom.palette.

fit.CI.palette

As per palette except for the fit.CI lines (confidence interval around trend). An additional option is "Group colors", which uses the colors from palette.

fit.CI.palette.custom.color

As per palette.custom.color.

fit.CI.palette.custom.gradient.start

As per palette.custom.gradient.start.

fit.CI.palette.custom.gradient.end

As per palette.custom.gradient.end.

fit.CI.palette.custom.palette

As per palette.custom.palette.

subslice.palette

As per palette except for pie chart subslice colors. An additional option is "Group colors", which uses the colors from palette.

subslice.palette.custom.color

As per palette.custom.color.

subslice.palette.custom.gradient.start

As per palette.custom.gradient.start.

subslice.palette.custom.gradient.end

As per palette.custom.gradient.end.

subslice.palette.custom.palette

As per palette.custom.palette.


Displayr/flipChart documentation built on Sept. 20, 2024, 10:56 a.m.