| scale_eyes_continuous | R Documentation |
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.
scale_eyes_continuous(..., range = c(0.1, 2), midpoint = mean) scale_eyes(..., range = c(0.1, 2), midpoint = mean)
... |
Other arguments passed onto |
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 |
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.
A Scale layer object for use with ggplot2.
geom_chernoff, scale_brow, scale_smile
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.