# Easily round log scale limits for nice plots — limit_log • FreesearchR
Easily round log scale limits for nice plots

Skip to contents

# Easily round log scale limits for nice plots

Source: `R/regression_plot.R`
`limit_log.Rd`

Easily round log scale limits for nice plots

## Usage

    limit_log(data, fun, ...)

## Arguments

data

  data

fun

  rounding function (floor/ceiling)

...

  ignored

## Value

numeric vector

## Examples

    limit_log(-.1, floor)
    #> [1] 0.7
    limit_log(.1, ceiling)
    #> [1] 2
    limit_log(-2.1, ceiling)
    #> [1] 0.008
    limit_log(2.1, ceiling)
    #> [1] 200