scale_eyes: Scales for eye separation

scale_eyes_continuousR Documentation

Scales for eye separation

Description

scale_eyes lets you customise how eye separation is determined from your data. It also lets you tweak the appearance of legends and so on.

Usage

scale_eyes_continuous(..., range = c(0.1, 2), midpoint = mean)

scale_eyes(..., range = c(0.1, 2), midpoint = mean)

Arguments

...

Other arguments passed onto continuous_scale to control name, limits, breaks, labels and so forth.

range

Output range of eye distances. 0 corresponds to a cyclops and +1 to a 'normal' distance.

midpoint

A value or function of your data that will return a 'normal' separation

Details

Use range to vary how happily/sadly your maximum/minimum values are represented. Minima smaller than -1 and maxima greater than +1 are possible but might look odd! You can use midpoint to set a specific 'zero' value in your data or to have eye width represented as relative to average.

The function scale_eyes is an alias of scale_eyes_continuous.

Legends are a work in progress. In particular, size mappings might produce odd results.

Value

A Scale layer object for use with ggplot2.

See Also

geom_chernoff, scale_brow, scale_smile

Examples

library(ggplot2)
p <- ggplot(iris) +
    aes(Sepal.Width, Sepal.Length, fill = Species, eyes = Sepal.Length) +
    geom_chernoff()
p
p + scale_eyes_continuous(midpoint = min)
p + scale_eyes_continuous(range = c(0, 2))


Selbosh/ggChernoff documentation built on Nov. 24, 2022, 3:29 a.m.