ggrange: plot range of a ggplot object

View source: R/axis.R

yrangeR Documentation

plot range of a ggplot object

Description

extract x or y ranges of a ggplot

Usage

yrange(gg, type = "limit", region = "panel")

xrange(gg, type = "limit", region = "panel")

ggrange(gg, var, type = "limit", region = "panel")

Arguments

gg

a ggplot object

type

one of 'limit' or 'range', if 'region == "plot"', to extract plot limit or plot data range

region

one of 'panel' or 'plot' to indicate extracting range based on the plot panel (scale expand will be counted) or plot data (scale expand will not be counted)

var

either 'x' or 'y'

Value

range of selected axis

Author(s)

Guangchuang Yu


ggfun documentation built on Oct. 30, 2024, 9:13 a.m.