stat_bicolor {colorpatch}R Documentation

Plots a ratio/confidence plot using a bivariate colormap

Description

Plots a ratio/confidence plot using a bivariate colormap

Usage

stat_bicolor(mapping = NULL, data = NULL, geom = "tile",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, color.fun = HsvColorFun(), size.fun = HsvSizeFun(),
  ...)

Arguments

mapping

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.

data

The data to be displayed in this layer.

geom

Defaults to tile.

position

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

na.rm

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

show.legend

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.

inherit.aes

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.fun

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

size.fun

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

...

further arguments given to the StatColorPatch() function

Value

a ggplot statistics layer for showing bicolored maps

Examples

library(ggplot2)
library(colorpatch)
dat <- CreateExampleData()
df <- ToDataFrame(dat)
p <- ggplot(df) + theme_colorpatch() + stat_bicolor(aes(ratio=ratio,conf=conf,x=x,y=y))

[Package colorpatch version 0.1.2 Index]