modulus_breaks: Modulus breaks factory

Description Usage Arguments Details Value

View source: R/quickplots.R

Description

This function tries to replicate/approximate the nice functionality of log-transformation ('scales' package to be used for 'ggplot2' plots, using for example ggplot2::scale_x_log10()). that automatically shows breaks values in the original scale, even though the axis is on a transformed scale. Unfortunately, that is not the default behaviour of other transformations, and the modulus transformation in particular.

Usage

1
modulus_breaks(p_custom, n.breaks_default = 10)

Arguments

p_custom

p transformation exponent, as in scales::modulus_trans

n.breaks_default

number of breaks

Details

This function does not aim for a clever algorithm. Rather it just calculates optimal breaks (labeling::extended) on the original and transformed scales, and combine them, expressing all in the original scale

Take a look at scales::log_breaks and ?scales::log_trans

Value

numeric vector with the breaks


edalfon/wdiquickplots documentation built on Dec. 24, 2021, 3 p.m.