stat_colorpatch {colorpatch}R Documentation

A stat function for the use with ggplot2


A stat function for the use with ggplot2


stat_colorpatch(mapping = NULL, data = NULL, geom = "tile",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, = ColorPatchColorFun(), = ColorPatchSizeFun(), ...)



Set of aesthetic mappings created by ggplot2::aes(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.


The data to be displayed in this layer.


Defaults to tile.


Position adjustment, either as a string, or the result of a call to a position adjustment function.


If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.


logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes.


If FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders.

Color function mapping a (ratio,conf) pair to a color (defaults to colorpatch::ColorPatchColorFun()).

Size function mapping a (ratio,conf) pair to a rectangle size (defaults to colorpatch::ColorPatchSizeFun() returning constantly 1).


Further arguments given to the colorpatch::StatColorPatch ggproto object. Here thresh.ratio, thresh.conf are the most important parameters.


a ggplot statistics layer for showing color patches

[Package colorpatch version 0.1.2 Index]