getSizePlot {clinDataReview}R Documentation

Get dimensions for a clinical data plot

Description

This function set sensitive defaults dimensions for a plot in the package. This includes:

Usage

getSizePlot(
  width = NULL,
  height = NULL,
  gg = NULL,
  nrow = 1L,
  ncol = 1L,
  title = NULL,
  subtitle = NULL,
  caption = NULL,
  xLab = NULL,
  facet = FALSE,
  includeLegend = TRUE,
  legendPosition = "right",
  y = NULL
)

Arguments

width

Numeric, width of the plot in pixels, 700 by default.

height

Numeric, height of the plot in pixels, 700 by default.

gg

ggplot

nrow

single-length integer specifying the number of facet rows in the plot. (default = 1) Overwritten if gg is specified.

ncol

single-length integer specifying the number of facet columns in the plot. (default = 1) Overwritten if gg is specified.

title

String with title for the plot.

subtitle

String with subtitle.
The subtitle is included at the top left of the plot, below the title.

caption

String with caption.
The caption is included at the bottom right of the plot. Please note that this might overlap with vertical or rotated x-axis labels.

xLab

String with label for xVar.

facet

Logical, if TRUE the plot contains facets.

includeLegend

Logical, if TRUE (by default) a legend is available in the plot.

legendPosition

String with position of the legend, among: 'top'/'left'/'bottom'/'right', 'right' by default.

y

Character vector or factor with elements in the y-axis, or list of such vectors. If a list is provided, the maximum height obtained across the different list elements is used.

Value

Numeric vector with width ('width') and height ('height') of the plot in pixels.

Author(s)

Laure Cougnaud


[Package clinDataReview version 1.5.0 Index]