From 5891e210bd4037554c792067ad955ff9a23867ec Mon Sep 17 00:00:00 2001 From: Ty Garber Date: Wed, 6 Mar 2024 15:47:05 -0800 Subject: [PATCH] fix to precision of percent change in the input comparison chart --- R/compare_inputs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/compare_inputs.R b/R/compare_inputs.R index bb2eefe..357d815 100644 --- a/R/compare_inputs.R +++ b/R/compare_inputs.R @@ -48,7 +48,7 @@ compare_inputs_chart <- function(.data){ #dplyr::filter(!is.na(.data$percent_diff)) |> ggplot2::ggplot(ggplot2::aes(factor(.data$fishery_id), .data$time_step, fill = dplyr::if_else(.data$percent_diff > 0, 'pos', 'neg'), alpha=abs(.data$percent_diff))) + ggplot2::geom_tile() + - ggplot2::geom_text(ggplot2::aes(label = paste0(scales::percent(.data$percent_diff), '\n', .data$reg_change ))) + + ggplot2::geom_text(ggplot2::aes(label = paste0(scales::percent(round(.data$percent_diff,3)), '\n', .data$reg_change ))) + ggplot2::theme(legend.position = 'none') + ggplot2::labs( subtitle = 'FRAM input comparison heatmap',