diff --git a/R/adjust.R b/R/adjust.R index 95e0b53e..855688a7 100644 --- a/R/adjust.R +++ b/R/adjust.R @@ -71,8 +71,7 @@ adjust_x_axis <- function(gg, title = ggplot2::waiver(), breaks = ggplot2::waive } if (is_continuous(gg, "x")) { if (is_waiver(labels) && cut_short_scale) - # labels <- scales::label_number(scale_cut = scales::cut_short_scale()) - labels = ggplot2::waiver() + labels <- scales::label_number(scale_cut = scales::cut_short_scale()) cli::cli_alert_success("adjust_x_axis: {.pkg continuous}") suppressMessages( if (is_continuous(gg, "y")) @@ -102,7 +101,7 @@ adjust_x_axis <- function(gg, title = ggplot2::waiver(), breaks = ggplot2::waive adjust_y_axis <- function(gg, title = ggplot2::waiver(), breaks = ggplot2::waiver(), labels = ggplot2::waiver(), limits = NULL, padding_bottom = NULL, padding_top = NULL, transformation = "identity", position = "left", - cut_short_scale = TRUE, force_y_continuous = FALSE, ...) { + cut_short_scale = FALSE, force_y_continuous = FALSE, ...) { # parse title if (!is_waiver(title)) title <- tidyplot_parser(as.character(title)) @@ -143,8 +142,7 @@ adjust_y_axis <- function(gg, title = ggplot2::waiver(), breaks = ggplot2::waive } if (is_continuous(gg, "y") || force_y_continuous) { if (is_waiver(labels) && cut_short_scale) - # labels <- scales::label_number(scale_cut = scales::cut_short_scale()) - labels = ggplot2::waiver() + labels <- scales::label_number(scale_cut = scales::cut_short_scale()) cli::cli_alert_success("adjust_y_axis: {.pkg continuous}") suppressMessages( if (is_continuous(gg, "x")) diff --git a/R/todo.R b/R/todo.R index dd515e83..6e4288da 100644 --- a/R/todo.R +++ b/R/todo.R @@ -1,14 +1,10 @@ -# with fixed scales 1.3.1: re-activate cut_short_scale() +# When bug in cut_short_scale() is fixed (expected in scales 1.3.1), change default: adjust_y_axis(cut_short_scale = TRUE) # work on check_pipeline() # enforce "sequence of funs", with warnings and errors -# what happens when tidyplot functinos are applied to a ggplot that is was generated with tidyplot() - -# data set "dinosaurs" - -# data set "EU or world countiries" +# what happens when tidyplot functions are applied to a ggplot that is was NOT generated with tidyplot() # make color schemes accessible