extract x or y ranges of a ggplot
yrange(gg, type = "limit", region = "panel")
xrange(gg, type = "limit", region = "panel")
ggrange(gg, var, type = "limit", region = "panel")a ggplot object
one of 'limit' or 'range', if 'region == "plot"', to extract plot limit or plot data range
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)
either 'x' or 'y'
range of selected axis