From 5c7fd128ec1449aa72b4fd289dac4057bd48cbff Mon Sep 17 00:00:00 2001 From: Samer Mouksassi Date: Mon, 23 Dec 2024 14:30:06 +0200 Subject: [PATCH] fix theme for table when ybrake_ylabel is true --- R/forest_plot.R | 9 +++++---- coveffectsplot.Rproj | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/forest_plot.R b/R/forest_plot.R index d197e3b..b37c2fc 100644 --- a/R/forest_plot.R +++ b/R/forest_plot.R @@ -1139,6 +1139,11 @@ forest_plot <- function( axis.ticks.y = ggplot2::element_blank() ) } + if (show_table_yaxis_tick_label && break_ylabel) { + table_plot <- table_plot + + ggplot2::scale_y_discrete(labels = label_wrap(y_label_text_width)) + } + if (!reserve_table_xaxis_label_space) { table_plot <- table_plot + ggplot2::theme( @@ -1196,10 +1201,6 @@ forest_plot <- function( ) } - if (break_ylabel) { - table_plot <- table_plot + - ggplot2::scale_y_discrete(labels = label_wrap(y_label_text_width)) - } } } diff --git a/coveffectsplot.Rproj b/coveffectsplot.Rproj index 21a4da0..b10fc84 100644 --- a/coveffectsplot.Rproj +++ b/coveffectsplot.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: af89a8b6-fa96-48f1-b838-7186622fcd5f RestoreWorkspace: Default SaveWorkspace: Default