Learn R Programming

pavo (version 2.0.0)

hexplot: Plot a colour hexagon

Description

Produces a colour hexagon plot.

Usage

hexplot(hexdata, achro = TRUE, labels = TRUE, sectors = c("none",
  "fine", "coarse"), sec.col = "grey", out.lwd = 1, out.lty = 1,
  out.lcol = "black", labels.cex = 1, achrosize = 0.8,
  achrocol = "grey", margins = c(1, 1, 2, 2), square = TRUE, ...)

Arguments

hexdata

(required) a data frame, possibly a result from the colspace or hexagon function, containing values for the 'x' and 'y' coordinates as columns (labeled as such)

achro

should a point be plotted at the origin (defaults to TRUE)?

labels

plot verticy labels? Defaults to TRUE.

sectors

plot the bee-hue sector dividers? Options are:

  • 'none': No sectors (default)

  • 'fine': 36 10-degree sectors

  • 'coarse': six bee-hue sectors (blue, blue-green, green, uv-green, uv, uv-blue).

sec.col

line colour of hue sector dividers. Defaults to 'grey'.

out.lwd, out.lcol, out.lty

graphical parameters for hexagon outline.

labels.cex

character expansion factor for category labels when labels = TRUE)

achrosize

size of the point at the origin when achro = TRUE (defaults to 0.8)

achrocol

color of the point at the origin achro = TRUE (defaults to grey)

margins

margins for the plot.

square

logical. Should the aspect ratio of the plot be held to 1:1? (defaults to TRUE).

...

additional graphical options. See par.

References

Chittka L. (1992). The colour hexagon: a chromaticity diagram based on photoreceptor excitations as a generalized representation of colour opponency. Journal of Comparative Physiology A, 170(5), 533-543.

Chittka L, Shmida A, Troje N, Menzel R. (1994). Ultraviolet as a component of flower reflections, and the colour perception of Hymenoptera. Vision research, 34(11), 1489-1508.

Examples

Run this code
# NOT RUN {
data(flowers)
vis.flowers <- vismodel(flowers, visual = 'apis', qcatch = 'Ei', relative = FALSE,
                        vonkries = TRUE, achro = 'l', bkg = 'green')
hex.flowers <- colspace(vis.flowers, space = 'hexagon')
plot(hex.flowers)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab