Skip to contents

Auto plot or ggplot2 of an edibble design

Usage

# S3 method for edbl_table
autoplot(
  .edibble,
  title = NULL,
  aspect_ratio = 1,
  shape = "circle",
  text = FALSE,
  image = NULL,
  fill = NULL,
  node = NULL,
  horizontal = TRUE
)

Arguments

.edibble

An edibble desgin, an edibble table or an edibble graph.

title

The title of the plot. By default it is the name of the edibble design if available.

aspect_ratio

The aspect ratio of the graph.

shape

The shape of the unit.

text

A logical value of whether to show the text or not. Alternatively, it can be a ggplot2::element_text() object to customise other elements of text, e.g., size, font, font face, color, etc.

image

An image to use instead of shape. The file path to the image should be supplied. If an image is supplied, shape is ingored.

fill

A character vector of variable names to display. Only a maximum of three variables are allowed. Currently, it's assumed that the the variables are discrete. In general, it's assumed that the variables are treatment variables.

node

A character vector of variable names. It's assumed that the variables are units.

horizontal

A logical value indicating whether the display should be optimized for horizontal display (default) or vertical display. Not yet implemented.

...

Unused at the moment.

Value

A ggplot object.