Skip to contents

This function sets the size of the plot, in big points. By default, it will create a figure with width equal to 192bp and panel height (not total figure height!) equal to 99bp. It supports other present sizes as well as custom sizes.

Usage

set_plot_size(
  size = c("narrow", "wide", "box_narrow", "box_wide", "slides", "custom"),
  plot_height = NULL,
  plot_width = NULL,
  panel_height = NULL,
  panel_width = NULL
)

Arguments

size

dimensions of the figure. For instance, 'narrow' creates default figures of 192x99 points. Valid values are c('narrow', 'wide', 'box_narrow', 'box_wide', 'slides', 'custom'). Note that 'slides' will produce a 192x161 figure, ideal for two-pane Powerpoint slides.

plot_height

height of the figure in points (technically; bigpoints); useful when size='custom'.

plot_width

height of the figure in points (technically; bigpoints); useful when size='custom'.

panel_height

height of the panel in points (technically; bigpoints); useful when size='custom'.

panel_width

height of the panel in points (technically; bigpoints); useful when size='custom'.

Value

A ggh4x::forcedsize S3 object that can be added to a plot.