Note: These functions are still experimental and may change in the future.
legend_right()
plots graph with legend right to it.
qmixtile()
plots multivariate data into colour channels using
ggplot2::geom_tile()
.
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,
...
)
Plot object.
Legend object.
Size of legend part.
Matrix to be plotted with mixed colour channels.
Pure component colours, names determine legend labels.
See ggplot2::geom_tile()
.
qmixtile()
: handed to colmix_rgb()
.
qmixlegend()
and colmix_rgb()
hand further arguments to the normalize
function.
If TRUE
, mapping
will be handed to
ggplot2::geom_tile()
instead of ggplot2::ggplot()
.
Matrix with component intensities in columns.
See base::min()
.
(logical) Should a legend be produced instead of normalized values?
(integer) Number of colours to produce in legend.
numeric with value corresponding to "lowest" colour for each column.
numeric with value corresponding to "highest" colour for each column.
Width of label bar.
Number of colours in legend.
Component names.
Function to normalize the values.
Value to mix against
(for sub = TRUE
only, 1 = white, 0 = black)
Subtractive colour mixing?
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.
qmixlegend()
: ggplot2::ggplot()
object with legend.
colmix_rgb()
: character vector with colours.