From fecbaef8ae325c83c12cc03652f9bbdb73530311 Mon Sep 17 00:00:00 2001 From: Aki Vehtari Date: Mon, 19 Jan 2026 21:52:26 +0200 Subject: [PATCH 1/2] use relative fontsize for model size numbers --- R/methods.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/methods.R b/R/methods.R index 6df8c44a1..cfe514132 100644 --- a/R/methods.R +++ b/R/methods.R @@ -1105,8 +1105,9 @@ plot.vsel <- function( x_color_txt <- "black" } pp <- pp + - geom_text(aes(y = -Inf, label = .data[["size_chr"]]), vjust = -0.5, - color = x_color_txt) + geom_text(aes(y = -Inf, label = .data[["size_chr"]], + size = from_theme(fontsize * 0.7)), + vjust = -0.5, color = x_color_txt) } # Miscellaneous stuff (axes, theming, faceting, etc.): if (!is.na(ranking_nterms_max) && ranking_colored && From b7e15a99f7e20f5203fed73fabb32c8561af6013 Mon Sep 17 00:00:00 2001 From: Osvaldo A Martin Date: Thu, 22 Jan 2026 12:49:14 +0200 Subject: [PATCH 2/2] Update R/methods.R --- R/methods.R | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/R/methods.R b/R/methods.R index cfe514132..c42f99d6d 100644 --- a/R/methods.R +++ b/R/methods.R @@ -1105,9 +1105,15 @@ plot.vsel <- function( x_color_txt <- "black" } pp <- pp + - geom_text(aes(y = -Inf, label = .data[["size_chr"]], - size = from_theme(fontsize * 0.7)), - vjust = -0.5, color = x_color_txt) + if (packageVersion("ggplot2") < "4.0.0") { + geom_text(aes(y = -Inf, label = .data[["size_chr"]]), vjust = -0.5, + color = x_color_txt) + } else { + geom_text(aes(y = -Inf, label = .data[["size_chr"]], + size = from_theme(fontsize * 0.7)), + vjust = -0.5, color = x_color_txt) + + } } # Miscellaneous stuff (axes, theming, faceting, etc.): if (!is.na(ranking_nterms_max) && ranking_colored &&