scale_x_truncate {campfin}R Documentation

Truncate and wrap x-axis labels

Description

Truncate the labels of a plot's discrete x-axis labels so that the text does not overflow and collide with other bars.

Usage

scale_x_truncate(n = 15, ...)

scale_x_wrap(width = 15, ...)

Arguments

n

The maximum width of string. Passed to stringr::str_trunc().

...

Additional arguments passed to ggplot2::scale_x_discrete().

width

Positive integer giving target line width in characters. A width less than or equal to 1 will put each word on its own line. Passed to stringr::str_wrap().


[Package campfin version 1.0.11 Index]