uniform.y.axis: Plot Y-axis uniforming

View source: R/uniform.y.axis.R

uniform.y.axisR Documentation

Plot Y-axis uniforming

Description

Takes a list of ggplot2 plots, compares their Y-axis ranges and applies the highest/lowest limits to each plot in order to uniform all the plots. It can be used also to set the ticks step (to just change the breaks set all parameters as FALSE).

Usage

uniform.y.axis(
  plot.list,
  y.min = TRUE,
  y.max = TRUE,
  ticks.each = NULL,
  digits = 1
)

Arguments

plot.list

A single plot or a list of plots.

y.min

Either a logical value to define whether uniform the lower limit or a numeric value defining the lower limit. By default TRUE.

y.max

Either a logical value to define whether uniform the upper limit or a numeric value defining the upper limit. By default TRUE.

ticks.each

Numeric value to define every how much should be placed a tick. By default NULL, ticks will be placed automatically.

digits

A single integer indicating the maximum number of digits required for the rounding of the axis values. By default 1.

Value

Returns a plot list (or a single plot when only one input plot is provided) equivalent to the input list provided by the user in which the Y-axis of all the plots will be uniformed.


sebastian-gregoricchio/Rseb documentation built on Sept. 4, 2024, 1:59 p.m.