ggexpand: hexpand

View source: R/axis.R

hexpandR Documentation

hexpand

Description

hexpand

vexpand

expand xlim (ylim) by ratio of x (y) axis range

Usage

hexpand(ratio, direction = 1)

vexpand(ratio, direction = 1)

ggexpand(ratio, direction = 1, side = "hv")

Arguments

ratio

expand x (y) axis limits by amount of xrange (yrange) * ratio

direction

expand x axis limit at right hand side if direction is 1 (default), or left hand side if direction is -1

side

one of 'h' for horizontal and 'v' for vertical or 'hv' for both (default).

Value

ggexpand object

Author(s)

Guangchuang Yu

Examples

x <- rtree(20)
x$tip.label <- paste0('RRRRREEEEEAAAAALLLLLYYYYY_Long_Lable_', x$tip.label)
p1 <- ggtree(x) + geom_tiplab()
p1 + ggexpand(1.5, side = "h")

YuLab-SMU/ggtree documentation built on April 15, 2024, 5:19 p.m.