Note: These functions are still experimental and may change in the future.

  • legend_right() plots graph with legend right to it.

  • normalize_colrange() normalizes the range of each column to [0, 1].

  • normalize_range() normalizes the range of all columns to [0, 1].

  • normalize_null() does not touch the values.

  • normalize_minmax() normalizes the range of each column j to [min_j, max_j].

  • qmixlegend() legends for mixed colour plots.

  • colmix_rgb(): multi-channel colour mixing.

legend_right(p, l, legend.width = 8, legend.unit = "lines")

qmixtile(
  object,
  purecol = stop("pure component colors needed."),
  mapping = aes_string(x = "x", y = "y", fill = "spc"),
  ...,
  map.tileonly = FALSE
)

normalize_colrange(x, na.rm = TRUE, legend = FALSE, n = 100, ...)

normalize_range(x, na.rm = TRUE, legend = FALSE, n = 100, ...)

normalize_null(x, na.rm = TRUE, legend = FALSE, n = 100, ...)

normalize_minmax(x, min = 0, max = 1, legend = FALSE, n = 100, ...)

qmixlegend(
  x,
  purecol,
  dx = 0.33,
  ny = 100,
  labels = names(purecol),
  normalize = normalize_colrange,
  ...
)

colmix_rgb(
  x,
  purecol,
  against = 1,
  sub = TRUE,
  normalize = normalize_colrange,
  ...
)

Arguments

p

Plot object.

l

Legend object.

legend.width, legend.unit

Size of legend part.

object

Matrix to be plotted with mixed colour channels.

purecol

Pure component colours, names determine legend labels.

mapping

See ggplot2::geom_tile().

...
  • qmixtile(): handed to colmix_rgb().

  • qmixlegend() and colmix_rgb() hand further arguments to the normalize function.

map.tileonly

If TRUE, mapping will be handed to ggplot2::geom_tile() instead of ggplot2::ggplot().

x

Matrix with component intensities in columns.

na.rm

See base::min().

legend

(logical) Should a legend be produced instead of normalized values?

n

(integer) Number of colours to produce in legend.

min

numeric with value corresponding to "lowest" colour for each column.

max

numeric with value corresponding to "highest" colour for each column.

dx

Width of label bar.

ny

Number of colours in legend.

labels

Component names.

normalize

Function to normalize the values.

against

Value to mix against (for sub = TRUE only, 1 = white, 0 = black)

sub

Subtractive colour mixing?

Value

  • legend_right(): invisible NULL.

  • normalize_colrange() (and other normalize_*() functions): list with components ymin, max and fill to specify value and fill colour value (still numerical!) for the legend, otherwise the normalized values.

  • colmix_rgb(): character vector with colours.

See also

Author

Claudia Beleites