scatterPlotPlusH3: function to generate an aligned set of (maximum 3) plots as a...

View source: R/generalStat.R

scatterPlotPlusH3R Documentation

function to generate an aligned set of (maximum 3) plots as a 1x3 matrix (3 columns, 1 row)

Description

function to generate an aligned set of (maximum 3) plots as a 1x3 matrix (3 columns, 1 row)

Usage

scatterPlotPlusH3(
  sPlot,
  yLeft = clearPlot(),
  yRight = clearPlot(),
  widths = c(150, 500, 350)
)

Arguments

sPlot

ggplot object to be placed in the middle

yLeft

ggplot object to be placed on the left (along y-axis of sPlot)

yRight

ggplot object to be placed on the right (along y-axis of sPlot)

widths

horizontal: two number (integer) vector specifying the amount of the plot to be used for the plots (horizontally)

Value

a ggplot object

Note

what is returned is grobtable (class gtable): this can be drawn via the grid.draw() function. The plot drawn before this will have to be cleared "manually" via clearPlot()


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.