rat_breaks: Compute breaks for ratio scale

View source: R/rat_scales.R

rat_breaksR Documentation

Compute breaks for ratio scale

Description

Function to compute tick marks evenly spaced on the log scale but with pretty numbers on the ratio scale

Usage

rat_breaks(base = exp(1), n = 5)

Arguments

base

Scalar, base of the logarithm in use (not implemented)

n

scalar, target number of breaks (not implemented)

Value

Function to apply over a vector values to generate axis breaks

Examples

ggplot2::ggplot(data = data.frame(x= 1:6, y = seq(-1, 1.5, 0.5))
       , ggplot2::aes(x, y))+
             ggplot2::geom_point()+
             ggplot2::scale_y_continuous(
             , breaks = rat_breaks()
             ) +
             ggplot2::geom_hline(yintercept = 0, size = 0.2)

mikeroswell/MeanRarity documentation built on May 5, 2024, 4:50 p.m.