scale_x_power: Power transformations for ggplot2's axis.

Description Usage Arguments Details Functions See Also Examples

View source: R/hello.R

Description

FUNCTION_DESCRIPTION

Usage

1
2
3

Arguments

power

A value with 1/n, where n must be an integer number. Default: 1/2

...

Other parameters passed to scale_x_continuous.

Details

DETAILS

Functions

See Also

scale_continuous power_trans,semi_scientific_formatting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
if(interactive()){
 p <- tibble(a=rgamma(1000, shape = c(.1,3, 16), rate=1)) %>% ggplot(aes(a))+
 geom_histogram(bins=50)
 p + scale_x_sqrt()      #  no ticks below 10
 p + scale_x_power(1/2)  #  reasonable ticks (powers of two with human-readable rounding)
 p + scale_x_power(1/4)  #  other powers than .5 are possible
 }

## End(Not run)

FelixTheStudent/ggpower documentation built on March 5, 2020, 8:37 p.m.