Learn R Programming

ggChernoff (version 0.3.0)

chernoffGrob: Draw a smiley face

Description

Uses Grid graphics to draw a face.

Usage

chernoffGrob(
  x = 0.5,
  y = 0.5,
  size = 1,
  colour = "black",
  fill = NA,
  alpha = 1,
  smile = 1,
  brow = NA,
  nose = FALSE,
  eyes = 1
)

Value

A grobTree object.

Arguments

x

horizontal position

y

vertical position

size

area of the face

colour

colour of outlines and features

fill

fill colour

alpha

transparency, where 0 is transparent and 1 is opaque

smile

amount of smiling/frowning

brow

eyebrow angle, to represent anger or concern

nose

logical. Adds a nose to the face

eyes

distance between the eyes

See Also

geom_chernoff

Examples

Run this code
face <- chernoffGrob(.5, .5, size = 1e3, smile = -1, brow = 1, colour = 'navy', fill = 'lightblue')
grid::grid.newpage()
grid::grid.draw(face)

Run the code above in your browser using DataLab