diff --git a/NEWS.md b/NEWS.md index 2b9d9d3..189b632 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # bench (development version) +* `scale_*_bench_*()` functions now supply more informative axis breaks + (@simonpcouch, #143). + # bench 1.1.3 * Long unnamed `bench_expr` expressions are now truncated correctly when used as diff --git a/R/bytes.R b/R/bytes.R index 9e59dc2..c22332d 100644 --- a/R/bytes.R +++ b/R/bytes.R @@ -170,7 +170,7 @@ bench_bytes_trans <- function(base = 2) { if (is.null(base)) { return( scales::trans_new("bch:byt", as.numeric, as_bench_bytes, - scales::pretty_breaks(), domain = c(1e-100, Inf) + breaks = scales::pretty_breaks(), domain = c(1e-100, Inf) ) ) } @@ -178,7 +178,7 @@ bench_bytes_trans <- function(base = 2) { inv <- function(x) as_bench_bytes(base ^ as.numeric(x)) scales::trans_new(paste0("bch:byt-", format(base)), trans, inv, - scales::log_breaks(base = base), domain = c(1e-100, Inf)) + breaks = scales::log_breaks(base = base), domain = c(1e-100, Inf)) } scale_type.bench_bytes <- function(x) "bench_bytes"