From 0eae69f629d6d5b548b4f4ac4e950add14bc43fa Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Mon, 25 May 2026 14:53:18 -0700 Subject: [PATCH 01/13] feat(theme): add new themes and improve existing ones New themes: socviz, broadsheet, nber, web. Each targets a distinct publication aesthetic (academic social science, newspaper, NBER working papers, and 538-style web respectively). Improvements to existing themes: - ipsum: bold title, plain subtitle, no ticks, fine grid (xy), tighter spacing, custom palette per #408 - bw: smaller axis text (cex.axis=0.8), tighter gaps, fine grid (xy) to better match ggplot2 equivalent - classic: same gap/cex adjustments as bw - tufte/void: now dynamic (dynmar=TRUE) for responsive margins --- R/tinytheme.R | 136 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 130 insertions(+), 6 deletions(-) diff --git a/R/tinytheme.R b/R/tinytheme.R index 5795eee7..d36b9cb1 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -177,6 +177,7 @@ tinytheme = function( "default", "basic", "dynamic", "clean", "clean2", "bw", "classic", "minimal", "ipsum", "dark", + "socviz", "broadsheet", "nber", "web", "ridge", "ridge2", "tufte", "void" ), @@ -193,14 +194,16 @@ tinytheme = function( theme, c( "default", - sort(c("basic", "bw", "classic", "clean", "clean2", "dark", "dynamic", - "ipsum", "minimal", "ridge", "ridge2", "tufte", "void")) + sort(c("basic", "broadsheet", "bw", "classic", "clean", "clean2", "dark", + "dynamic", "ipsum", "minimal", "nber", "ridge", "ridge2", + "socviz", "tufte", "void", "web")) ) ) settings = switch(theme, "default" = theme_default, "basic" = theme_basic, + "broadsheet" = theme_broadsheet, "bw" = theme_bw, "classic" = theme_classic, "clean" = theme_clean, @@ -209,10 +212,13 @@ tinytheme = function( "dynamic" = theme_dynamic, "ipsum" = theme_ipsum, "minimal" = theme_minimal, + "nber" = theme_nber, "ridge" = theme_ridge, "ridge2" = theme_ridge2, + "socviz" = theme_socviz, "tufte" = theme_tufte, "void" = theme_void, + "web" = theme_web, ) dots = list(...) @@ -340,8 +346,14 @@ theme_tufte = modifyList(theme_default, list( adj.main = 0, adj.sub = 0, bty = "n", + dynmar = TRUE, font.main = 1, + gap.axis = 0.2, + gap.lab = 1.0, lab = c(10, 10, 7), + las = 1, + mar = c(0.1, 0.1, 0.6, 0.6), + mgp = NULL, # palette.sequential = "Grays", pch = 16, side.sub = 3, @@ -353,12 +365,16 @@ theme_void = modifyList(theme_default, list( adj.cap = 1, adj.main = 0, adj.sub = 0, + dynmar = TRUE, font.main = 1, + gap.axis = 0.2, + gap.lab = 1.0, + mar = c(0.1, 0.1, 0.6, 0.6), + mgp = NULL, palette.qualitative = "Tableau 10", palette.sequential = "ag_Sunset", pch = 16, side.sub = 3, - # tck = -.02, xaxt = "none", yaxt = "none" )) @@ -408,9 +424,12 @@ theme_clean = modifyList(theme_dynamic, list( theme_classic = modifyList(theme_dynamic, list( tinytheme = "classic", bty = "l", + cex.axis = 0.8, cex.cap = 0.8, facet.bg = NULL, font.main = 1, + gap.axis = 0.1, + gap.lab = 0.4, palette.qualitative = "Okabe-Ito" )) @@ -427,7 +446,11 @@ theme_clean2 = modifyList(theme_clean, list( theme_bw = modifyList(theme_clean, list( tinytheme = "bw", + cex.axis = 0.8, font.main = 1, + gap.axis = 0.1, + gap.lab = 0.4, + grid = "xy", grid.lty = 1, grid.lwd = 0.5, lwd = 0.5, @@ -451,10 +474,17 @@ theme_minimal = modifyList(theme_bw, list( theme_ipsum = modifyList(theme_minimal, list( tinytheme = "ipsum", - bty = "n", - font.sub = 3, + adj.xlab = 1, adj.ylab = 1, - adj.xlab = 1 + cex.lab = 0.8, + font.main = 2, + font.sub = 1, + gap.axis = 0, + gap.lab = 0.7, + grid = "xy", + palette.qualitative = c("#D18975", "#8FD175", "#3F2D54", "#75B8D1", + "#2D543D", "#C9D175", "#D1AB75", "#D175B8", "#758BD1"), + tcl = 0 )) theme_dark = modifyList(theme_minimal, list( @@ -487,3 +517,97 @@ theme_ridge2 = modifyList(theme_clean2, list( palette.qualitative = "Zissou 1", grid = FALSE )) + +# derivatives of "minimal" +# - socviz + +theme_socviz = modifyList(theme_minimal, list( + tinytheme = "socviz", + bty = "l", + cex.axis = 1.1, + cex.cap = 0.75, + cex.lab = 1, + cex.main = 1.4, + cex.sub = 1.05, + col.xaxs = "gray10", + col.yaxs = "gray10", + facet.bg = NULL, + facet.col = "grey10", + font.main = 2, + grid.col = "gray90", + grid.lty = 1, + grid.lwd = 0.3, + lwd = 1, + lwd.axis = 1, + palette.qualitative = c("#E69F00", "#56B4E9", "#009E73", "#D55E00", + "#CC79A7", "#0072B2", "#F0E442", "#000000"), + tcl = -0.25, + xaxt = "standard", + yaxt = "standard" +)) + +# derivatives of "dynamic" +# - broadsheet +# - web + +theme_broadsheet = modifyList(theme_dynamic, list( + tinytheme = "broadsheet", + bty = "n", + cex.cap = 0.8, + col.cap = "gray40", + col.sub = "gray40", + font.main = 2, + gap.axis = 0.1, + gap.lab = 0.5, + grid = "Y", + grid.col = "gray85", + grid.lty = 1, + grid.lwd = 0.5, + palette.qualitative = "Okabe-Ito", + tcl = -0.2, + yaxt = "labels" +)) + +# derivatives of "broadsheet" +# - nber + +theme_nber = modifyList(theme_broadsheet, list( + tinytheme = "nber", + bg = "#F2F7FB", + cex.cap = 1, + cex.main = 1.4, + cex.sub = 1, + col.axis = "#4C4D4F", + col.lab = "#6D6E72", + col.main = "#4C4D4F", + col.sub = "#6D6E72", + col.cap = "#6D6E72", + col.xaxs = "#6D6E72", + facet.bg = "white", + facet.col = "#6D6E72", + font.cap = 3, + font.lab = 3, + font.sub = 3, + grid.col = "#BCBFC3", + palette.qualitative = c( + "#0063A7", "#6D6E70", "#941A22", + "#EDAF48", "#2E8B57", "#7B5EA7") +)) + +theme_web = modifyList(theme_dynamic, list( + tinytheme = "web", + bg = "#F0F0F0", + bty = "n", + cex.cap = 0.8, + col.cap = "gray40", + col.sub = "gray40", + font.main = 2, + grid = TRUE, + grid.col = "#D2D2D2", + grid.lty = 1, + grid.lwd = 0.5, + palette.qualitative = c("#008FD5", "#FF2700", "#77AB43"), + tcl = 0, + xaxt = "labels", + yaxt = "labels" +)) From b7182b91df7ac025b05e680a63ac9ed107fed3b2 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Mon, 25 May 2026 15:24:23 -0700 Subject: [PATCH 02/13] docs --- R/tinytheme.R | 26 +++++++++++++++----------- altdoc/pkgdown.yml | 2 +- man/tinytheme.Rd | 29 +++++++++++++++++++++++------ vignettes/themes.qmd | 6 ++++-- 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/R/tinytheme.R b/R/tinytheme.R index d36b9cb1..5cc4fe76 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -17,17 +17,21 @@ #' - `"default"`: inherits the user's default base graphics settings. #' - `"basic"`: light modification of `"default"`, only adding filled points, a panel background grid, and light gray background to facet titles. #' - `"dynamic"` (*): builds on `"basic"` by enabling dynamic margin adjustment with tighter default margins, horizontal axis labels, and the subtitle moved above the plotting area. Turns off the panel grid. Provides the foundation for all other dynamic themes and is a good starting point for users who wish to build custom dynamic themes. -#' - `"clean"` (*): builds on `"dynamic"` by re-enabling the panel background grid and setting different default palettes ("Tableau 10" for discrete colors and "agSunset" for gradient colors). -#' - `"clean2"` (*): removes the plot frame (box) from `"clean"`. -#' - `"classic"` (*): builds on `"dynamic"` with L-shaped axes (removing the top and right-hand edges of the plot frame). Also sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the **ggplot2** theme of the same name. -#' - `"bw"` (*): similar to `"clean"`, except uses thinner lines for the plot frame (box), solid grid lines, and sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the **ggplot2** theme of the same name. -#' - `"minimal"` (*): removes the plot frame (box) from `"bw"`, as well as the background for facet titles. Inspired by the **ggplot2** theme of the same name. -#' - `"ipsum"` (*): similar to `"minimal"`, except subtitle is italicised and axes titles are aligned to the far edges. Inspired by the **hrbrthemes** theme of the same name for **ggplot2**. -#' - `"dark"` (*): similar to `"minimal"`, but set against a dark background with foreground and a palette colours lightened for appropriate contrast. -#' - `"ridge"` (*): a specialized theme for ridge plots (see [`type_ridge()`]). Builds off of `"clean"`, but adds ridge-specific tweaks (e.g. default "Zissou 1" palette for discrete colors, solid horizontal grid lines, and minor adjustments to y-axis labels). Not recommended for non-ridge plots. -#' - `"ridge2"` (*): removes the plot frame (box) from `"ridge"`, but retains the x-axis line. Again, not recommended for non-ridge plots. -#' - `"tufte"`: floating axes and minimalist plot artifacts in the style of Edward Tufte. -#' - `"void"`: switches off all axes, titles, legends, etc. +#' - `"clean"` (*): builds on `"dynamic"` by re-enabling the panel background grid and setting different default palettes ("Tableau 10" for discrete colors and "agSunset" for gradient colors). +#' - `"clean2"` (*): removes the plot frame (box) from `"clean"`. +#' - `"classic"` (*): builds on `"dynamic"` with L-shaped axes (removing the top and right-hand edges of the plot frame), smaller axis text, tighter axis spacing, and the "Okabe-Ito" palette as a default for discrete colors. Inspired by the **ggplot2** theme of the same name. +#' - `"bw"` (*): similar to `"clean"`, except uses thinner lines for the plot frame (box), solid fine grid lines, smaller axis text, tighter axis spacing, and sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the **ggplot2** theme of the same name. +#' - `"minimal"` (*): removes the plot frame (box) from `"bw"`, as well as the background for facet titles. Inspired by the **ggplot2** theme of the same name. +#' - `"ipsum"` (*): builds on `"minimal"` with bold titles, no ticks, fine grid, edge-aligned axis titles, and a custom muted palette. Inspired by the **hrbrthemes** theme of the same name for **ggplot2**. +#' - `"dark"` (*): similar to `"minimal"`, but set against a dark background with foreground and a palette colours lightened for appropriate contrast. +#' - `"socviz"` (*): builds on `"minimal"` with L-shaped axes, very light grid lines, and larger axis text. Inspired by Kieran Healy's **socviz** package theme for **ggplot2**. +#' - `"broadsheet"` (*): a publication/newspaper style with only horizontal grid lines, no frame, short x-axis ticks, and muted secondary text (subtitle, caption). Compact axis spacing. +#' - `"nber"` (*): builds on `"broadsheet"` for an NBER working paper style with a light blue-grey background, grey text, italic axis titles and captions, and a blue-grey discrete palette. +#' - `"web"` (*): a FiveThirtyEight-inspired style with a light grey device background, no frame or axis lines, and bold grid lines. Suited to web/online publication. +#' - `"tufte"` (*): floating axes and minimalist plot artifacts in the style of Edward Tufte. +#' - `"void"` (*): switches off all axes, titles, legends, etc. +#' - `"ridge"` (*): a specialized theme for ridge plots (see [`type_ridge()`]). Builds off of `"clean"`, but adds ridge-specific tweaks (e.g. default "Zissou 1" palette for discrete colors, solid horizontal grid lines, and minor adjustments to y-axis labels). Not recommended for non-ridge plots. +#' - `"ridge2"` (*): removes the plot frame (box) from `"ridge"`, but retains the x-axis line. Again, not recommended for non-ridge plots. #' @param ... Named arguments to override specific theme settings. These #' arguments are passed to `tpar()` and take precedence over the predefined #' settings in the selected theme. diff --git a/altdoc/pkgdown.yml b/altdoc/pkgdown.yml index 8a4d3e90..d0c3118d 100644 --- a/altdoc/pkgdown.yml +++ b/altdoc/pkgdown.yml @@ -2,7 +2,7 @@ altdoc: 0.7.2 pandoc: 3.9.0.2 pkgdown: 2.1.3 pkgdown_sha: ~ -last_built: 2026-05-20T20:09:08+0000 +last_built: 2026-05-25T22:20:45+0000 urls: reference: https://grantmcdermott.com/tinyplot/man article: https://grantmcdermott.com/tinyplot/vignettes diff --git a/man/tinytheme.Rd b/man/tinytheme.Rd index f8fb5703..c9626490 100644 --- a/man/tinytheme.Rd +++ b/man/tinytheme.Rd @@ -6,7 +6,8 @@ \usage{ tinytheme( theme = c("default", "basic", "dynamic", "clean", "clean2", "bw", "classic", "minimal", - "ipsum", "dark", "ridge", "ridge2", "tufte", "void"), + "ipsum", "dark", "socviz", "broadsheet", "nber", "web", "ridge", "ridge2", "tufte", + "void"), ... ) } @@ -21,17 +22,33 @@ dynamic plots are marked with an asterisk (*) below. \item \code{"default"}: inherits the user's default base graphics settings. \item \code{"basic"}: light modification of \code{"default"}, only adding filled points, a panel background grid, and light gray background to facet titles. \item \code{"dynamic"} (*): builds on \code{"basic"} by enabling dynamic margin adjustment with tighter default margins, horizontal axis labels, and the subtitle moved above the plotting area. Turns off the panel grid. Provides the foundation for all other dynamic themes and is a good starting point for users who wish to build custom dynamic themes. +\itemize{ \item \code{"clean"} (*): builds on \code{"dynamic"} by re-enabling the panel background grid and setting different default palettes ("Tableau 10" for discrete colors and "agSunset" for gradient colors). +\itemize{ \item \code{"clean2"} (*): removes the plot frame (box) from \code{"clean"}. -\item \code{"classic"} (*): builds on \code{"dynamic"} with L-shaped axes (removing the top and right-hand edges of the plot frame). Also sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the \strong{ggplot2} theme of the same name. -\item \code{"bw"} (*): similar to \code{"clean"}, except uses thinner lines for the plot frame (box), solid grid lines, and sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the \strong{ggplot2} theme of the same name. +} +\item \code{"classic"} (*): builds on \code{"dynamic"} with L-shaped axes (removing the top and right-hand edges of the plot frame), smaller axis text, tighter axis spacing, and the "Okabe-Ito" palette as a default for discrete colors. Inspired by the \strong{ggplot2} theme of the same name. +\item \code{"bw"} (*): similar to \code{"clean"}, except uses thinner lines for the plot frame (box), solid fine grid lines, smaller axis text, tighter axis spacing, and sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the \strong{ggplot2} theme of the same name. +\itemize{ \item \code{"minimal"} (*): removes the plot frame (box) from \code{"bw"}, as well as the background for facet titles. Inspired by the \strong{ggplot2} theme of the same name. -\item \code{"ipsum"} (*): similar to \code{"minimal"}, except subtitle is italicised and axes titles are aligned to the far edges. Inspired by the \strong{hrbrthemes} theme of the same name for \strong{ggplot2}. +\itemize{ +\item \code{"ipsum"} (*): builds on \code{"minimal"} with bold titles, no ticks, fine grid, edge-aligned axis titles, and a custom muted palette. Inspired by the \strong{hrbrthemes} theme of the same name for \strong{ggplot2}. \item \code{"dark"} (*): similar to \code{"minimal"}, but set against a dark background with foreground and a palette colours lightened for appropriate contrast. +\item \code{"socviz"} (*): builds on \code{"minimal"} with L-shaped axes, very light grid lines, and larger axis text. Inspired by Kieran Healy's \strong{socviz} package theme for \strong{ggplot2}. +} +} +\item \code{"broadsheet"} (*): a publication/newspaper style with only horizontal grid lines, no frame, short x-axis ticks, and muted secondary text (subtitle, caption). Compact axis spacing. +\itemize{ +\item \code{"nber"} (*): builds on \code{"broadsheet"} for an NBER working paper style with a light blue-grey background, grey text, italic axis titles and captions, and a blue-grey discrete palette. +} +\item \code{"web"} (*): a FiveThirtyEight-inspired style with a light grey device background, no frame or axis lines, and bold grid lines. Suited to web/online publication. +\item \code{"tufte"} (*): floating axes and minimalist plot artifacts in the style of Edward Tufte. +\item \code{"void"} (*): switches off all axes, titles, legends, etc. \item \code{"ridge"} (*): a specialized theme for ridge plots (see \code{\link[=type_ridge]{type_ridge()}}). Builds off of \code{"clean"}, but adds ridge-specific tweaks (e.g. default "Zissou 1" palette for discrete colors, solid horizontal grid lines, and minor adjustments to y-axis labels). Not recommended for non-ridge plots. +\itemize{ \item \code{"ridge2"} (*): removes the plot frame (box) from \code{"ridge"}, but retains the x-axis line. Again, not recommended for non-ridge plots. -\item \code{"tufte"}: floating axes and minimalist plot artifacts in the style of Edward Tufte. -\item \code{"void"}: switches off all axes, titles, legends, etc. +} +} }} \item{...}{Named arguments to override specific theme settings. These diff --git a/vignettes/themes.qmd b/vignettes/themes.qmd index 975fa80c..d18316bb 100644 --- a/vignettes/themes.qmd +++ b/vignettes/themes.qmd @@ -49,7 +49,6 @@ tinytheme("minimal") tinyplot( Sepal.Width ~ Sepal.Length | Species, - facet = "by", data = iris, main = "Title of the plot", sub = "A smaller subtitle", @@ -65,7 +64,6 @@ here bumps out to accomodate the long horizontal y-axis labels: ```{r} tinyplot( I(Sepal.Width*1e5) ~ Sepal.Length | Species, - facet = "by", data = iris, yaxl = ",", # use comma format for the y-axis labels main = "Title of the plot", @@ -164,6 +162,10 @@ p("bw") p("minimal") p("ipsum") p("dark") +p("socviz") +p("broadsheet") +p("nber") +p("web") p("tufte") p("void") ``` From c632889d03bb5f9c6397bbc4b53391786a51320b Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Mon, 25 May 2026 17:10:23 -0700 Subject: [PATCH 03/13] ipsum2 --- R/tinytheme.R | 14 ++++++++++++-- man/tinytheme.Rd | 5 +++-- vignettes/themes.qmd | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/R/tinytheme.R b/R/tinytheme.R index 5cc4fe76..28eb3acd 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -23,6 +23,7 @@ #' - `"bw"` (*): similar to `"clean"`, except uses thinner lines for the plot frame (box), solid fine grid lines, smaller axis text, tighter axis spacing, and sets the "Okabe-Ito" palette as a default for discrete colors. Inspired by the **ggplot2** theme of the same name. #' - `"minimal"` (*): removes the plot frame (box) from `"bw"`, as well as the background for facet titles. Inspired by the **ggplot2** theme of the same name. #' - `"ipsum"` (*): builds on `"minimal"` with bold titles, no ticks, fine grid, edge-aligned axis titles, and a custom muted palette. Inspired by the **hrbrthemes** theme of the same name for **ggplot2**. +#' - `"ipsum2"` (*): a lighter variant of `"ipsum"` that retains the original italic subtitle and edge-aligned axis titles, but without the additional spacing and palette changes. #' - `"dark"` (*): similar to `"minimal"`, but set against a dark background with foreground and a palette colours lightened for appropriate contrast. #' - `"socviz"` (*): builds on `"minimal"` with L-shaped axes, very light grid lines, and larger axis text. Inspired by Kieran Healy's **socviz** package theme for **ggplot2**. #' - `"broadsheet"` (*): a publication/newspaper style with only horizontal grid lines, no frame, short x-axis ticks, and muted secondary text (subtitle, caption). Compact axis spacing. @@ -180,7 +181,7 @@ tinytheme = function( theme = c( "default", "basic", "dynamic", "clean", "clean2", "bw", "classic", - "minimal", "ipsum", "dark", + "minimal", "ipsum", "ipsum2", "dark", "socviz", "broadsheet", "nber", "web", "ridge", "ridge2", "tufte", "void" @@ -199,7 +200,7 @@ tinytheme = function( c( "default", sort(c("basic", "broadsheet", "bw", "classic", "clean", "clean2", "dark", - "dynamic", "ipsum", "minimal", "nber", "ridge", "ridge2", + "dynamic", "ipsum", "ipsum2", "minimal", "nber", "ridge", "ridge2", "socviz", "tufte", "void", "web")) ) ) @@ -215,6 +216,7 @@ tinytheme = function( "dark" = theme_dark, "dynamic" = theme_dynamic, "ipsum" = theme_ipsum, + "ipsum2" = theme_ipsum2, "minimal" = theme_minimal, "nber" = theme_nber, "ridge" = theme_ridge, @@ -491,6 +493,14 @@ theme_ipsum = modifyList(theme_minimal, list( tcl = 0 )) +theme_ipsum2 = modifyList(theme_minimal, list( + tinytheme = "ipsum2", + bty = "n", + font.sub = 3, + adj.ylab = 1, + adj.xlab = 1 +)) + theme_dark = modifyList(theme_minimal, list( tinytheme = "dark", bg = "#1A1A1A", diff --git a/man/tinytheme.Rd b/man/tinytheme.Rd index c9626490..dfff9837 100644 --- a/man/tinytheme.Rd +++ b/man/tinytheme.Rd @@ -6,8 +6,8 @@ \usage{ tinytheme( theme = c("default", "basic", "dynamic", "clean", "clean2", "bw", "classic", "minimal", - "ipsum", "dark", "socviz", "broadsheet", "nber", "web", "ridge", "ridge2", "tufte", - "void"), + "ipsum", "ipsum2", "dark", "socviz", "broadsheet", "nber", "web", "ridge", "ridge2", + "tufte", "void"), ... ) } @@ -33,6 +33,7 @@ dynamic plots are marked with an asterisk (*) below. \item \code{"minimal"} (*): removes the plot frame (box) from \code{"bw"}, as well as the background for facet titles. Inspired by the \strong{ggplot2} theme of the same name. \itemize{ \item \code{"ipsum"} (*): builds on \code{"minimal"} with bold titles, no ticks, fine grid, edge-aligned axis titles, and a custom muted palette. Inspired by the \strong{hrbrthemes} theme of the same name for \strong{ggplot2}. +\item \code{"ipsum2"} (*): a lighter variant of \code{"ipsum"} that retains the original italic subtitle and edge-aligned axis titles, but without the additional spacing and palette changes. \item \code{"dark"} (*): similar to \code{"minimal"}, but set against a dark background with foreground and a palette colours lightened for appropriate contrast. \item \code{"socviz"} (*): builds on \code{"minimal"} with L-shaped axes, very light grid lines, and larger axis text. Inspired by Kieran Healy's \strong{socviz} package theme for \strong{ggplot2}. } diff --git a/vignettes/themes.qmd b/vignettes/themes.qmd index d18316bb..be177033 100644 --- a/vignettes/themes.qmd +++ b/vignettes/themes.qmd @@ -161,6 +161,7 @@ p("classic") p("bw") p("minimal") p("ipsum") +p("ipsum2") p("dark") p("socviz") p("broadsheet") From 2e945a4e63c8dda3007f55045b71a64948e90cd4 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Mon, 25 May 2026 17:19:13 -0700 Subject: [PATCH 04/13] update tests snapshots --- .../pointrange_with_layers_flipped.svg | 74 +-- .../_tinysnapshot/tinytheme_broadsheet.svg | 111 +++++ inst/tinytest/_tinysnapshot/tinytheme_bw.svg | 163 +++---- .../_tinysnapshot/tinytheme_classic.svg | 128 +++--- .../tinytest/_tinysnapshot/tinytheme_dark.svg | 135 +++--- .../_tinysnapshot/tinytheme_dynamic_dark.svg | 391 ++++++++-------- .../tinytheme_dynamic_dark_facet.svg | 422 +++++++++++------- .../_tinysnapshot/tinytheme_ipsum.svg | 139 +++--- .../_tinysnapshot/tinytheme_ipsum2.svg | 123 +++++ .../_tinysnapshot/tinytheme_minimal.svg | 135 +++--- .../tinytest/_tinysnapshot/tinytheme_nber.svg | 111 +++++ .../_tinysnapshot/tinytheme_socviz.svg | 137 ++++++ .../_tinysnapshot/tinytheme_tufte.svg | 196 ++++---- .../tinytest/_tinysnapshot/tinytheme_void.svg | 94 ++-- inst/tinytest/_tinysnapshot/tinytheme_web.svg | 110 +++++ 15 files changed, 1604 insertions(+), 865 deletions(-) create mode 100644 inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg create mode 100644 inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg create mode 100644 inst/tinytest/_tinysnapshot/tinytheme_nber.svg create mode 100644 inst/tinytest/_tinysnapshot/tinytheme_socviz.svg create mode 100644 inst/tinytest/_tinysnapshot/tinytheme_web.svg diff --git a/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg b/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg index 1b33106b..8c8c8017 100644 --- a/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg +++ b/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg @@ -26,47 +26,47 @@ -y -x - - - - - - --10 -0 -10 -20 -30 - - - - - -(Intercept) -hp -factor(cyl)6 -factor(cyl)8 - +y +x + + + + + + +-10 +0 +10 +20 +30 + + + + + +(Intercept) +hp +factor(cyl)6 +factor(cyl)8 + - - + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg new file mode 100644 index 00000000..3580a418 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + +factor(am) +0 +1 +tinytheme("broadsheet") + + + + + + + +Title of the plot +hp +mpg + + + + + + + + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg index 0845c677..b9d0a13c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("bw") +tinytheme("bw") @@ -39,86 +39,99 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg index c215c1b5..99df2d0d 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("classic") +tinytheme("classic") @@ -39,75 +39,75 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg index a05da310..f414eeec 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("dark") +tinytheme("dark") @@ -39,72 +39,85 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg index ec298224..11c55a7a 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -41,198 +41,215 @@ -Dynamic plot adjustment and whitespace reduction -Petal.Length -I(Sepal.Length * 1e+09) +Dynamic plot adjustment and whitespace reduction +Petal.Length +I(Sepal.Length * 1e+09) -1 -2 -3 -4 -5 -6 -7 -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 +1 +2 +3 +4 +5 +6 +7 +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg index 68ade0fd..5fdeafe1 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg @@ -36,7 +36,7 @@ - - - - disp -Works with facets too +Works with facets too @@ -44,229 +44,307 @@ -Dynamic plot adjustment and whitespace reduction -I(hp * 100) -I(mpg * 1000) +Dynamic plot adjustment and whitespace reduction +I(hp * 100) +I(mpg * 1000) - - + + - + -10000 -15000 -20000 -25000 -30000 - -0 +10000 +15000 +20000 +25000 +30000 + +0 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -1 - -4 + +1 + +4 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -6 + +6 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -5000 -10000 -15000 -20000 -25000 -30000 -10000 -15000 -20000 -25000 -30000 +5000 +10000 +15000 +20000 +25000 +30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -5000 -10000 -15000 -20000 -25000 -30000 - -8 +5000 +10000 +15000 +20000 +25000 +30000 + +8 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg index 8fa157d6..8bb6de41 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg @@ -26,12 +26,12 @@ - - + + factor(am) 0 1 -tinytheme("ipsum") +tinytheme("ipsum") @@ -39,72 +39,85 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg new file mode 100644 index 00000000..4bd17368 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + +factor(am) +0 +1 +tinytheme("ipsum2") + + + + + + + +Title of the plot +hp +mpg + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg index 0f18115c..6d094249 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("minimal") +tinytheme("minimal") @@ -39,72 +39,85 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_nber.svg b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg new file mode 100644 index 00000000..30411102 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + +factor(am) +0 +1 +tinytheme("nber") + + + + + + + +Title of the plot +hp +mpg + + + + + + + + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg new file mode 100644 index 00000000..868013c6 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + +factor(am) +0 +1 +tinytheme("socviz") + + + + + + + +Title of the plot +hp +mpg + + + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg index 8f8755f4..f4a23a0c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg @@ -26,114 +26,114 @@ - - -factor(am) -0 -1 -tinytheme("tufte") + + +factor(am) +0 +1 +tinytheme("tufte") - - + + - -Title of the plot -hp -mpg + +Title of the plot +hp +mpg - - - - - - - - - - - - - - - - -60 -80 -120 -160 -200 -240 -280 -320 - - - - - - - - - - - - - - -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30 -32 -34 + + + + + + + + + + + + + + + + +60 +80 +120 +160 +200 +240 +280 +320 + + + + + + + + + + + + + + +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +30 +32 +34 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_void.svg b/inst/tinytest/_tinysnapshot/tinytheme_void.svg index d7723bec..7c468437 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_void.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_void.svg @@ -26,61 +26,61 @@ - - -factor(am) -0 -1 -tinytheme("void") + + +factor(am) +0 +1 +tinytheme("void") - - + + - -Title of the plot -hp -mpg + +Title of the plot +hp +mpg - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_web.svg b/inst/tinytest/_tinysnapshot/tinytheme_web.svg new file mode 100644 index 00000000..98fde2aa --- /dev/null +++ b/inst/tinytest/_tinysnapshot/tinytheme_web.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + +factor(am) +0 +1 +tinytheme("web") + + + + + + + +Title of the plot +hp +mpg + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From baf3dffe10f52d8f4a2e5e2ba690740ec0203149 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Mon, 25 May 2026 17:23:55 -0700 Subject: [PATCH 05/13] news --- NEWS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NEWS.md b/NEWS.md index a14c6dd0..3ab9d8c2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -49,6 +49,13 @@ visualizations. replacing the guesswork of manually combining `mar`, `mgp`, and `tcl` values. (#590) +- **Theme refinements**. The `"tufte"` and `"void"` themes are now dynamic + (responsive margins). The `"ipsum"` theme has been overhauled (bold title, no + ticks, fine grid, custom palette); the original variant is preserved as + `"ipsum2"`. The `"bw"` and `"classic"` themes now use smaller axis text and + tighter spacing to better match their ggplot2 counterparts. + (#595 @grantmcdermott) + ### New features - New `ljust` parameter for controlling legend title and label justification. @@ -80,6 +87,9 @@ visualizations. dynamic themes (since separation from `sub` is guaranteed). Appearance is customizable via `tpar()` parameters: `adj.cap`, `cex.cap`, `col.cap`, `font.cap`, and `line.cap`. (#592 @grantmcdermott) +- New themes: `"socviz"`, `"broadsheet"`, `"nber"`, and `"web"`, targeting + academic social science, newspaper, NBER working paper, and web-style (e.g., + FiveThirtyEight) aesthetics respectively. (#595 @grantmcdermott) ### Bug fixes From b8e8330a2189a7a7f532041a61ce7701d6be7dc0 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Tue, 26 May 2026 08:54:49 -0700 Subject: [PATCH 06/13] ipsum cap should be italic --- R/tinytheme.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/tinytheme.R b/R/tinytheme.R index 28eb3acd..f55cb338 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -485,6 +485,7 @@ theme_ipsum = modifyList(theme_minimal, list( cex.lab = 0.8, font.main = 2, font.sub = 1, + font.cap = 3, gap.axis = 0, gap.lab = 0.7, grid = "xy", From ba6d8f6d1634d3cd1b716e2411d63dff3d45bbf3 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Tue, 26 May 2026 09:57:27 -0700 Subject: [PATCH 07/13] tufte tweaks --- R/tinytheme.R | 68 +++---- .../_tinysnapshot/tinytheme_tufte.svg | 180 +++++++++--------- 2 files changed, 119 insertions(+), 129 deletions(-) diff --git a/R/tinytheme.R b/R/tinytheme.R index f55cb338..5bb9e6c2 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -346,45 +346,6 @@ theme_basic = modifyList(theme_default, list( pch = 16 )) -theme_tufte = modifyList(theme_default, list( - tinytheme = "tufte", - adj.cap = 1, - adj.main = 0, - adj.sub = 0, - bty = "n", - dynmar = TRUE, - font.main = 1, - gap.axis = 0.2, - gap.lab = 1.0, - lab = c(10, 10, 7), - las = 1, - mar = c(0.1, 0.1, 0.6, 0.6), - mgp = NULL, - # palette.sequential = "Grays", - pch = 16, - side.sub = 3, - tcl = 0.2 -)) - -theme_void = modifyList(theme_default, list( - tinytheme = "void", - adj.cap = 1, - adj.main = 0, - adj.sub = 0, - dynmar = TRUE, - font.main = 1, - gap.axis = 0.2, - gap.lab = 1.0, - mar = c(0.1, 0.1, 0.6, 0.6), - mgp = NULL, - palette.qualitative = "Tableau 10", - palette.sequential = "ag_Sunset", - pch = 16, - side.sub = 3, - xaxt = "none", - yaxt = "none" -)) - # derivatives of "basic" # - dynamic @@ -626,3 +587,32 @@ theme_web = modifyList(theme_dynamic, list( xaxt = "labels", yaxt = "labels" )) + +# standalone dynamic derivatives +# - tufte +# - void + +theme_tufte = modifyList(theme_dynamic, list( + tinytheme = "tufte", + bty = "n", + facet.bg = NULL, + facet.border = NA, + font.main = 1, + gap.axis = -0.2, + gap.lab = 0.5, + grid = FALSE, + lab = c(10, 10, 7), + tcl = 0.2 +)) + +theme_void = modifyList(theme_dynamic, list( + tinytheme = "void", + facet.bg = NULL, + facet.border = NA, + font.main = 1, + grid = FALSE, + palette.qualitative = "Tableau 10", + palette.sequential = "ag_Sunset", + xaxt = "none", + yaxt = "none" +)) diff --git a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg index f4a23a0c..85b77492 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("tufte") +tinytheme("tufte") @@ -39,101 +39,101 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg - - - - - - - - - - - - - - - - -60 -80 -120 -160 -200 -240 -280 -320 - - - - - - - - - - - - - - -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30 -32 -34 + + + + + + + + + + + + + + + + +60 +80 +120 +160 +200 +240 +280 +320 + + + + + + + + + + + + + + +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +30 +32 +34 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 03ab23236d59db8a11cbef60478e7d80107337b5 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 15:38:03 -0700 Subject: [PATCH 08/13] fix(margins): consistent y-title to y-label gap across label widths The gap between y-axis tick labels and the y-axis title previously varied depending on label width (e.g., 1-digit vs 2-digit). Three issues combined: 1. The whtsbp threshold used a cex-dependent value (min(1, 0.5*cex_axis)) creating a discontinuity. Changed to fixed 0.5, which algebraically produces exactly gap.lab regardless of label width or theme settings. 2. The whtsbp bump was clamped to >= 0 in tinyplot.R, so narrow-label plots never adjusted their margin or title position. Now allows negative values so the margin and title shift inward together. 3. ymgp_shift (designed for cex_axis > 1) went negative for cex_axis < 1, pushing the title away from labels. Clamped with max(0, ...) in the title offset formula. 4. The no-facet dynmar path in facet.R had its own whtsbp calculation with a separate > 0 clamp that overrode the tinyplot.R computation. Removed that clamp to stay consistent. Note: a pre-existing edge case remains where degenerate ylim (e.g., plt(1)) causes axisTicks to underestimate label width at pre-computation time. This will be addressed in a follow-up. --- R/facet.R | 18 +++++++----------- R/tinyplot.R | 22 ++++++++++++++-------- altdoc/pkgdown.yml | 2 +- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/R/facet.R b/R/facet.R index 795bbf1b..9ed05a2a 100644 --- a/R/facet.R +++ b/R/facet.R @@ -153,7 +153,7 @@ draw_facet_window = function( } if (!is.null(yaxl)) yaxlabs = tinylabel(yaxlabs, yaxl) # whtsbp = grconvertX(max(strwidth(yaxl, "figure")), from = "nfc", to = "lines") - 1 - whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - grconvertX(0, from = "nfc", to = "lines") - 1 + whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - grconvertX(0, from = "nfc", to = "lines") - 0.5 if (whtsbp > 0) { omar = omar + c(0, whtsbp, 0, 0) * cex_fct_adj fmar[2] = fmar[2] + whtsbp * cex_fct_adj @@ -177,7 +177,7 @@ draw_facet_window = function( if (!is.null(names(xlabs))) names(xlabs) else xlabs } if (!is.null(xaxl)) xaxlabs = tinylabel(xaxlabs, xaxl) - whtsbp = grconvertX(max(strwidth(xaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 1 + whtsbp = grconvertX(max(strwidth(xaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 0.5 if (whtsbp > 0) { omar = omar + c(whtsbp, 0, 0, 0) * cex_fct_adj fmar[1] = fmar[1] + whtsbp * cex_fct_adj @@ -243,21 +243,17 @@ draw_facet_window = function( } if (!is.null(yaxl)) yaxlabs = tinylabel(yaxlabs, yaxl) # whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 1 - whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - grconvertX(0, from = "nfc", to = "lines") - 1 - if (whtsbp > 0) { - omar[2] = omar[2] + whtsbp - } + whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - grconvertX(0, from = "nfc", to = "lines") - 0.5 + omar[2] = omar[2] + whtsbp } if (par("las") %in% 2:3) { # extra whitespace bump on the x axis # xaxl = axTicks(1) - xaxlabs = if (is.null(xlabs)) axisTicks(usr = extendrange(xlim, f = 0.04), log = par("xlog")) else + xaxlabs = if (is.null(xlabs)) axisTicks(usr = extendrange(xlim, f = 0.04), log = par("xlog")) else if (!is.null(names(xlabs))) names(xlabs) else xlabs if (!is.null(xaxl)) xaxlabs = tinylabel(xaxlabs, xaxl) - whtsbp = grconvertX(max(strwidth(xaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 1 - if (whtsbp > 0) { - omar[1] = omar[1] + whtsbp - } + whtsbp = grconvertX(max(strwidth(xaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 0.5 + omar[1] = omar[1] + whtsbp } par(mar = omar) diff --git a/R/tinyplot.R b/R/tinyplot.R index 289d470a..af63162a 100644 --- a/R/tinyplot.R +++ b/R/tinyplot.R @@ -1094,6 +1094,8 @@ tinyplot.default = function( # block runs before that. Pass .cex_axis to strwidth so measurements # reflect the intended text size (par("cex.axis") isn't set yet either). .whtsbp = c(0, 0, 0, 0) + .whtsbp_y_raw = 0 + .whtsbp_x_raw = 0 .las = get_tpar("las", tpar_list = .tpars, default = par("las")) if (.las %in% 1:2) { if (type == "ridge") { @@ -1106,16 +1108,16 @@ tinyplot.default = function( yaxlabs = axisTicks(usr = extendrange(ylim, f = 0.04), log = par("ylog")) } if (!is.null(yaxl)) yaxlabs = tinylabel(yaxlabs, yaxl) - whtsbp_y = grconvertX(max(strwidth(yaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - - grconvertX(0, from = "nfc", to = "lines") - 1 - if (is.finite(whtsbp_y) && whtsbp_y > 0) .whtsbp[2] = whtsbp_y + .whtsbp_y_raw = grconvertX(max(strwidth(yaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - + grconvertX(0, from = "nfc", to = "lines") - 0.5 + if (is.finite(.whtsbp_y_raw)) .whtsbp[2] = .whtsbp_y_raw } if (.las %in% 2:3) { xaxlabs = if (is.null(xlabs)) axisTicks(usr = extendrange(xlim, f = 0.04), log = par("xlog")) else if (!is.null(names(xlabs))) names(xlabs) else xlabs if (!is.null(xaxl)) xaxlabs = tinylabel(xaxlabs, xaxl) - whtsbp_x = grconvertX(max(strwidth(xaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - 1 - if (is.finite(whtsbp_x) && whtsbp_x > 0) .whtsbp[1] = whtsbp_x + .whtsbp_x_raw = grconvertX(max(strwidth(xaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - 0.5 + if (is.finite(.whtsbp_x_raw)) .whtsbp[1] = .whtsbp_x_raw } # Under facets, per-facet tick labels render smaller (scaled by @@ -1123,7 +1125,11 @@ tinyplot.default = function( # — needs the same scaling to match the actual rendered margin used by # draw_facet_window. Without this, draw_title's mar reserves too much # space on the LHS and anchors the title too far right. - if (cex_fct_adj != 1) .whtsbp = .whtsbp * cex_fct_adj + if (cex_fct_adj != 1) { + .whtsbp = .whtsbp * cex_fct_adj + .whtsbp_y_raw = .whtsbp_y_raw * cex_fct_adj + .whtsbp_x_raw = .whtsbp_x_raw * cex_fct_adj + } dynmar_computed = .theme_mar + .dyn par(mar = dynmar_computed + .whtsbp) @@ -1223,8 +1229,8 @@ tinyplot.default = function( } draw_title(main, sub, cap, xlab, ylab, legend, legend_args, opar, - xlab_line_offset = if (!is.null(dynmar_computed)) .whtsbp[1] else 0, - ylab_line_offset = if (!is.null(dynmar_computed)) .whtsbp[2] - .ymgp_shift - .ylab_cex_shift else 0) + xlab_line_offset = if (!is.null(dynmar_computed)) .whtsbp_x_raw else 0, + ylab_line_offset = if (!is.null(dynmar_computed)) .whtsbp_y_raw - max(0, .ymgp_shift) - .ylab_cex_shift else 0) } diff --git a/altdoc/pkgdown.yml b/altdoc/pkgdown.yml index d0c3118d..1961883b 100644 --- a/altdoc/pkgdown.yml +++ b/altdoc/pkgdown.yml @@ -2,7 +2,7 @@ altdoc: 0.7.2 pandoc: 3.9.0.2 pkgdown: 2.1.3 pkgdown_sha: ~ -last_built: 2026-05-25T22:20:45+0000 +last_built: 2026-05-26T19:00:25+0000 urls: reference: https://grantmcdermott.com/tinyplot/man article: https://grantmcdermott.com/tinyplot/vignettes From a12f67b83fe1c51e667e01cd509f098947775cca Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 16:08:10 -0700 Subject: [PATCH 09/13] fix(margins): handle degenerate ylim in whtsbp pre-computation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ylim has zero range (e.g., plt(1)), axisTicks underestimates label width because extendrange produces a near-zero range. Expand to ylim ± 0.5 to match what plot.window actually renders — but only when yaxb is NULL (user-specified breaks already know the labels). Closes #596 --- R/facet.R | 6 ++++-- R/tinyplot.R | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/facet.R b/R/facet.R index 9ed05a2a..a9b73a37 100644 --- a/R/facet.R +++ b/R/facet.R @@ -239,7 +239,8 @@ draw_facet_window = function( yaxlabs = if (!is.null(names(xlabs))) names(xlabs) else xlabs } else { # yaxl = axTicks(2) - yaxlabs = axisTicks(usr = extendrange(ylim, f = 0.04), log = par("ylog")) + ylim_usr = if (diff(ylim) == 0 && is.null(yaxb)) ylim + c(-0.5, 0.5) else extendrange(ylim, f = 0.04) + yaxlabs = axisTicks(usr = ylim_usr, log = par("ylog")) } if (!is.null(yaxl)) yaxlabs = tinylabel(yaxlabs, yaxl) # whtsbp = grconvertX(max(strwidth(yaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 1 @@ -249,7 +250,8 @@ draw_facet_window = function( if (par("las") %in% 2:3) { # extra whitespace bump on the x axis # xaxl = axTicks(1) - xaxlabs = if (is.null(xlabs)) axisTicks(usr = extendrange(xlim, f = 0.04), log = par("xlog")) else + xlim_usr = if (diff(xlim) == 0 && is.null(xaxb)) xlim + c(-0.5, 0.5) else extendrange(xlim, f = 0.04) + xaxlabs = if (is.null(xlabs)) axisTicks(usr = xlim_usr, log = par("xlog")) else if (!is.null(names(xlabs))) names(xlabs) else xlabs if (!is.null(xaxl)) xaxlabs = tinylabel(xaxlabs, xaxl) whtsbp = grconvertX(max(strwidth(xaxlabs, "figure", cex = par("cex.axis"))), from = "nfc", to = "lines") - 0.5 diff --git a/R/tinyplot.R b/R/tinyplot.R index af63162a..8fe049a6 100644 --- a/R/tinyplot.R +++ b/R/tinyplot.R @@ -1105,7 +1105,8 @@ tinyplot.default = function( } else if (type == "boxplot" && isTRUE(flip) && !is.null(xlabs)) { yaxlabs = if (!is.null(names(xlabs))) names(xlabs) else xlabs } else { - yaxlabs = axisTicks(usr = extendrange(ylim, f = 0.04), log = par("ylog")) + ylim_usr = if (diff(ylim) == 0 && is.null(yaxb)) ylim + c(-0.5, 0.5) else extendrange(ylim, f = 0.04) + yaxlabs = axisTicks(usr = ylim_usr, log = par("ylog")) } if (!is.null(yaxl)) yaxlabs = tinylabel(yaxlabs, yaxl) .whtsbp_y_raw = grconvertX(max(strwidth(yaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - @@ -1113,7 +1114,8 @@ tinyplot.default = function( if (is.finite(.whtsbp_y_raw)) .whtsbp[2] = .whtsbp_y_raw } if (.las %in% 2:3) { - xaxlabs = if (is.null(xlabs)) axisTicks(usr = extendrange(xlim, f = 0.04), log = par("xlog")) else + xlim_usr = if (diff(xlim) == 0 && is.null(xaxb)) xlim + c(-0.5, 0.5) else extendrange(xlim, f = 0.04) + xaxlabs = if (is.null(xlabs)) axisTicks(usr = xlim_usr, log = par("xlog")) else if (!is.null(names(xlabs))) names(xlabs) else xlabs if (!is.null(xaxl)) xaxlabs = tinylabel(xaxlabs, xaxl) .whtsbp_x_raw = grconvertX(max(strwidth(xaxlabs, "figure", cex = .cex_axis)), from = "nfc", to = "lines") - 0.5 From c9c30a56105a04f5e53159533a51a1b44d2dfa6c Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 16:18:47 -0700 Subject: [PATCH 10/13] update snapshots --- .../_tinysnapshot/cap_bottom_legend.svg | 404 +- inst/tinytest/_tinysnapshot/cap_clean.svg | 404 +- .../_tinysnapshot/facet_cex_large.svg | 596 +-- .../_tinysnapshot/facet_free_yscale.svg | 232 +- inst/tinytest/_tinysnapshot/grid_facet_xy.svg | 132 +- inst/tinytest/_tinysnapshot/grid_theme_xy.svg | 156 +- .../_tinysnapshot/legend_direct_clean2.svg | 72 +- .../_tinysnapshot/legend_direct_facet.svg | 168 +- .../_tinysnapshot/legend_direct_lm.svg | 64 +- .../legend_direct_long_label.svg | 70 +- .../legend_direct_nudge_named.svg | 72 +- .../_tinysnapshot/legend_direct_nudge_y.svg | 72 +- .../_tinysnapshot/legend_direct_repel.svg | 72 +- .../_tinysnapshot/margins_cex_axis1_lab3.svg | 104 +- .../_tinysnapshot/margins_cex_axis3_lab1.svg | 104 +- .../_tinysnapshot/margins_cex_axis3_lab3.svg | 104 +- .../_tinysnapshot/margins_facet_multiline.svg | 134 +- .../_tinysnapshot/margins_large_cex.svg | 104 +- .../margins_large_cex_facets.svg | 300 +- .../_tinysnapshot/margins_missing_labels.svg | 92 +- .../_tinysnapshot/margins_multiline_2x2.svg | 442 +- .../margins_multiline_labels.svg | 112 +- .../margins_sub_na_bottom_legend.svg | 132 +- .../pointrange_with_layers_flipped.svg | 74 +- .../_tinysnapshot/ridge_basic_theme_ridge.svg | 72 +- .../ridge_basic_theme_ridge2.svg | 62 +- .../_tinysnapshot/ridge_by_x_theme_ridge.svg | 3138 ++++++------ .../_tinysnapshot/ridge_by_x_theme_ridge2.svg | 3128 ++++++------ .../_tinysnapshot/ridge_by_y_theme_ridge.svg | 80 +- .../_tinysnapshot/ridge_by_y_theme_ridge2.svg | 98 +- .../ridge_gradient_facet_theme_ridge.svg | 2 +- .../ridge_gradient_facet_theme_ridge2.svg | 4216 ++++++++--------- .../ridge_gradient_theme_ridge.svg | 3138 ++++++------ .../ridge_gradient_theme_ridge2.svg | 3128 ++++++------ .../_tinysnapshot/ridge_theme_bg_numeric.svg | 62 +- .../_tinysnapshot/ridge_theme_palette.svg | 70 +- inst/tinytest/_tinysnapshot/tinylabel.svg | 192 +- .../_tinysnapshot/tinytheme_broadsheet.svg | 122 +- inst/tinytest/_tinysnapshot/tinytheme_bw.svg | 176 +- .../_tinysnapshot/tinytheme_classic.svg | 128 +- .../_tinysnapshot/tinytheme_clean.svg | 148 +- .../_tinysnapshot/tinytheme_clean2.svg | 120 +- .../tinytest/_tinysnapshot/tinytheme_dark.svg | 148 +- .../_tinysnapshot/tinytheme_dynamic.svg | 126 +- .../tinytheme_dynamic_boxplot_flip.svg | 186 +- .../_tinysnapshot/tinytheme_dynamic_clean.svg | 408 +- .../tinytheme_dynamic_clean_facet.svg | 584 +-- .../tinytheme_dynamic_clean_spineplot.svg | 156 +- .../_tinysnapshot/tinytheme_dynamic_dark.svg | 408 +- .../tinytheme_dynamic_dark_facet.svg | 500 +- .../tinytheme_dynamic_dynamic.svg | 378 +- .../tinytheme_dynamic_jitter_flip.svg | 238 +- .../_tinysnapshot/tinytheme_dynamic_ridge.svg | 76 +- .../tinytheme_dynamic_x_boxplot.svg | 188 +- .../_tinysnapshot/tinytheme_dynamic_yaxl.svg | 214 +- .../tinytheme_dynmar_mar_override.svg | 82 +- .../_tinysnapshot/tinytheme_ephemeral.svg | 418 +- .../_tinysnapshot/tinytheme_ipsum.svg | 146 +- .../_tinysnapshot/tinytheme_ipsum2.svg | 146 +- .../_tinysnapshot/tinytheme_legend_bottom.svg | 148 +- .../_tinysnapshot/tinytheme_legend_left.svg | 148 +- .../_tinysnapshot/tinytheme_minimal.svg | 148 +- .../tinytest/_tinysnapshot/tinytheme_nber.svg | 122 +- .../_tinysnapshot/tinytheme_ridge.svg | 126 +- .../_tinysnapshot/tinytheme_ridge2.svg | 98 +- .../_tinysnapshot/tinytheme_socviz.svg | 174 +- .../_tinysnapshot/tinytheme_tufte.svg | 178 +- .../tinytest/_tinysnapshot/tinytheme_void.svg | 76 +- inst/tinytest/_tinysnapshot/tinytheme_web.svg | 120 +- 69 files changed, 14018 insertions(+), 14018 deletions(-) diff --git a/inst/tinytest/_tinysnapshot/cap_bottom_legend.svg b/inst/tinytest/_tinysnapshot/cap_bottom_legend.svg index 8ece9600..d2fc7cd4 100644 --- a/inst/tinytest/_tinysnapshot/cap_bottom_legend.svg +++ b/inst/tinytest/_tinysnapshot/cap_bottom_legend.svg @@ -41,215 +41,215 @@ -Petal.Length +Petal.Length Sepal.Length - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/cap_clean.svg b/inst/tinytest/_tinysnapshot/cap_clean.svg index 84c1b269..0e2602bb 100644 --- a/inst/tinytest/_tinysnapshot/cap_clean.svg +++ b/inst/tinytest/_tinysnapshot/cap_clean.svg @@ -41,215 +41,215 @@ -Petal.Length +Petal.Length Sepal.Length - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_cex_large.svg b/inst/tinytest/_tinysnapshot/facet_cex_large.svg index ead59ea1..a24e4a69 100644 --- a/inst/tinytest/_tinysnapshot/facet_cex_large.svg +++ b/inst/tinytest/_tinysnapshot/facet_cex_large.svg @@ -26,329 +26,329 @@ -Sepal.Length +Sepal.Length Sepal.Width - - + + - + - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - - - - - - -2.0 -2.5 -3.0 -3.5 -4.0 - -setosa - + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +setosa + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - + - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - - - - - - -2.0 -2.5 -3.0 -3.5 -4.0 - -versicolor - + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +versicolor + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + - + - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - - - - - - -2.0 -2.5 -3.0 -3.5 -4.0 - -virginica - + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 + +virginica + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg index fc8bf35e..5c14a286 100644 --- a/inst/tinytest/_tinysnapshot/facet_free_yscale.svg +++ b/inst/tinytest/_tinysnapshot/facet_free_yscale.svg @@ -26,139 +26,139 @@ -Free facets: different y scales -x +Free facets: different y scales +x y - - + + - + - - - - - - - -0 -2 -4 -6 -8 -10 - - - - - - - -0 -2 -4 -6 -8 -10 - -A - + + + + + + + +0 +2 +4 +6 +8 +10 + + + + + + + +0 +2 +4 +6 +8 +10 + +A + - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - + - - - - - - - -0 -2 -4 -6 -8 -10 - - - - - - - -1000000 -1000002 -1000004 -1000006 -1000008 -1000010 - -B - + + + + + + + +0 +2 +4 +6 +8 +10 + + + + + + + +1000000 +1000002 +1000004 +1000006 +1000008 +1000010 + +B + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/grid_facet_xy.svg b/inst/tinytest/_tinysnapshot/grid_facet_xy.svg index 8203c9cf..83b00ab6 100644 --- a/inst/tinytest/_tinysnapshot/grid_facet_xy.svg +++ b/inst/tinytest/_tinysnapshot/grid_facet_xy.svg @@ -40,79 +40,79 @@ -faceted: grid = "xy" -mpg +faceted: grid = "xy" +mpg wt -10 -15 -20 -25 -30 -2 -3 -4 -5 +10 +15 +20 +25 +30 +2 +3 +4 +5 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/grid_theme_xy.svg b/inst/tinytest/_tinysnapshot/grid_theme_xy.svg index c5f96b75..3e5e6e98 100644 --- a/inst/tinytest/_tinysnapshot/grid_theme_xy.svg +++ b/inst/tinytest/_tinysnapshot/grid_theme_xy.svg @@ -26,89 +26,89 @@ -theme: grid = "xy" -mpg +theme: grid = "xy" +mpg wt - - - - - - -10 -15 -20 -25 -30 - - - - - -2 -3 -4 -5 - + + + + + + +10 +15 +20 +25 +30 + + + + + +2 +3 +4 +5 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_direct_clean2.svg b/inst/tinytest/_tinysnapshot/legend_direct_clean2.svg index afc1be6b..53c42dca 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_clean2.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_clean2.svg @@ -26,49 +26,49 @@ -Day +Day Temp -0 -5 -10 -15 -20 -25 -30 -60 -70 -80 -90 +0 +5 +10 +15 +20 +25 +30 +60 +70 +80 +90 - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -May -June -July -August -September +May +June +July +August +September diff --git a/inst/tinytest/_tinysnapshot/legend_direct_facet.svg b/inst/tinytest/_tinysnapshot/legend_direct_facet.svg index b90120c5..1a98eb96 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_facet.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_facet.svg @@ -26,112 +26,112 @@ -Day +Day Temp - - + + - + -0 -5 -10 -15 -20 -25 -30 -60 -70 -80 -90 - -cool - - - - - - - - - - - - - +0 +5 +10 +15 +20 +25 +30 +60 +70 +80 +90 + +cool + + + + + + + + + + + + + - - + + - + -0 -5 -10 -15 -20 -25 -30 - -hot - - - - - - - - - - - - - - - - - - - - - - - - - - - - +0 +5 +10 +15 +20 +25 +30 + +hot + + + + + + + + + + + + + + + + + + + + + + + + + + + + -May -June -July -August -September +May +June +July +August +September - + -May -June -July -August -September +May +June +July +August +September - - + + - + diff --git a/inst/tinytest/_tinysnapshot/legend_direct_lm.svg b/inst/tinytest/_tinysnapshot/legend_direct_lm.svg index e7afbaac..f245d4c7 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_lm.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_lm.svg @@ -26,47 +26,47 @@ -Petal.Length +Petal.Length Sepal.Length -1 -2 -3 -4 -5 -6 +1 +2 +3 +4 +5 +6 7 -5 -6 -7 -8 +5 +6 +7 +8 - - + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + -setosa -versicolor +setosa +versicolor virginica diff --git a/inst/tinytest/_tinysnapshot/legend_direct_long_label.svg b/inst/tinytest/_tinysnapshot/legend_direct_long_label.svg index 947271e2..f7a04f24 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_long_label.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_long_label.svg @@ -26,48 +26,48 @@ -Petal.Length +Petal.Length Sepal.Length -1 -2 -3 -4 -5 -6 -7 -5 -6 -7 -8 +1 +2 +3 +4 +5 +6 +7 +5 +6 +7 +8 - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -A very long species name -Medium -C +A very long species name +Medium +C diff --git a/inst/tinytest/_tinysnapshot/legend_direct_nudge_named.svg b/inst/tinytest/_tinysnapshot/legend_direct_nudge_named.svg index 014212e7..b7885993 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_nudge_named.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_nudge_named.svg @@ -26,49 +26,49 @@ -Day +Day Temp -0 -5 -10 -15 -20 -25 -30 -60 -70 -80 -90 +0 +5 +10 +15 +20 +25 +30 +60 +70 +80 +90 - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -May -June -July -August -September +May +June +July +August +September diff --git a/inst/tinytest/_tinysnapshot/legend_direct_nudge_y.svg b/inst/tinytest/_tinysnapshot/legend_direct_nudge_y.svg index a29400b4..0ba914cb 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_nudge_y.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_nudge_y.svg @@ -26,49 +26,49 @@ -Day +Day Temp -0 -5 -10 -15 -20 -25 -30 -60 -70 -80 -90 +0 +5 +10 +15 +20 +25 +30 +60 +70 +80 +90 - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -May -June -July -August -September +May +June +July +August +September diff --git a/inst/tinytest/_tinysnapshot/legend_direct_repel.svg b/inst/tinytest/_tinysnapshot/legend_direct_repel.svg index 7250bbb3..750c441a 100644 --- a/inst/tinytest/_tinysnapshot/legend_direct_repel.svg +++ b/inst/tinytest/_tinysnapshot/legend_direct_repel.svg @@ -26,49 +26,49 @@ -Day +Day Temp -0 -5 -10 -15 -20 -25 -30 -60 -70 -80 -90 +0 +5 +10 +15 +20 +25 +30 +60 +70 +80 +90 - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + -May -June -July -August -September +May +June +July +August +September diff --git a/inst/tinytest/_tinysnapshot/margins_cex_axis1_lab3.svg b/inst/tinytest/_tinysnapshot/margins_cex_axis1_lab3.svg index 9fb77ea8..512f2d13 100644 --- a/inst/tinytest/_tinysnapshot/margins_cex_axis1_lab3.svg +++ b/inst/tinytest/_tinysnapshot/margins_cex_axis1_lab3.svg @@ -26,63 +26,63 @@ -cex.axis = 1, cex.lab = 3 -X title (JjQqYy) +cex.axis = 1, cex.lab = 3 +X title (JjQqYy) Y title (JjQqYy) - - - - - - -2 -4 -6 -8 -10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab1.svg b/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab1.svg index 2c73460f..08f1ebc7 100644 --- a/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab1.svg +++ b/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab1.svg @@ -26,63 +26,63 @@ -cex.axis = 3, cex.lab = 1 -X title (JjQqYy) +cex.axis = 3, cex.lab = 1 +X title (JjQqYy) Y title (JjQqYy) - - - - - - -2 -4 -6 -8 -10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab3.svg b/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab3.svg index 4d4ebcbd..8464037b 100644 --- a/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab3.svg +++ b/inst/tinytest/_tinysnapshot/margins_cex_axis3_lab3.svg @@ -26,63 +26,63 @@ -cex.axis = 3, cex.lab = 3 -X title (JjQqYy) +cex.axis = 3, cex.lab = 3 +X title (JjQqYy) Y title (JjQqYy) - - - - - - -2 -4 -6 -8 -10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_facet_multiline.svg b/inst/tinytest/_tinysnapshot/margins_facet_multiline.svg index 07c0270c..76b56778 100644 --- a/inst/tinytest/_tinysnapshot/margins_facet_multiline.svg +++ b/inst/tinytest/_tinysnapshot/margins_facet_multiline.svg @@ -45,80 +45,80 @@ -Weight -(1000 lbs) +Weight +(1000 lbs) mpg - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_large_cex.svg b/inst/tinytest/_tinysnapshot/margins_large_cex.svg index 34ccfe77..35a34e4b 100644 --- a/inst/tinytest/_tinysnapshot/margins_large_cex.svg +++ b/inst/tinytest/_tinysnapshot/margins_large_cex.svg @@ -26,63 +26,63 @@ -cex.axis=3, cex.lab=2 -X label +cex.axis=3, cex.lab=2 +X label Y label - - - - - - -2 -4 -6 -8 -10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_large_cex_facets.svg b/inst/tinytest/_tinysnapshot/margins_large_cex_facets.svg index d251a95a..d771c27a 100644 --- a/inst/tinytest/_tinysnapshot/margins_large_cex_facets.svg +++ b/inst/tinytest/_tinysnapshot/margins_large_cex_facets.svg @@ -40,175 +40,175 @@ -Weight +Weight Miles per gallon - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4 - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 + + + + + + + + + + + + - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6 - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6 + + + + + + + + + + + + - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_missing_labels.svg b/inst/tinytest/_tinysnapshot/margins_missing_labels.svg index 5f73f727..a9af21a3 100644 --- a/inst/tinytest/_tinysnapshot/margins_missing_labels.svg +++ b/inst/tinytest/_tinysnapshot/margins_missing_labels.svg @@ -26,56 +26,56 @@ - - - - - - -2 -4 -6 -8 -10 - - - - - - -2 -4 -6 -8 -10 - + + + + + + +2 +4 +6 +8 +10 + + + + + + +2 +4 +6 +8 +10 + - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_multiline_2x2.svg b/inst/tinytest/_tinysnapshot/margins_multiline_2x2.svg index 2908f662..cc57f87c 100644 --- a/inst/tinytest/_tinysnapshot/margins_multiline_2x2.svg +++ b/inst/tinytest/_tinysnapshot/margins_multiline_2x2.svg @@ -33,67 +33,67 @@ -xlab = NA +xlab = NA Y - - - - - -5 -10 -15 -20 - - - - - - -0 -5 -10 -15 -20 - + + + + + +5 +10 +15 +20 + + + + + + +0 +5 +10 +15 +20 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -108,68 +108,68 @@ -xlab present -X +xlab present +X Y - - - - - -5 -10 -15 -20 - - - - - - -0 -5 -10 -15 -20 - + + + + + +5 +10 +15 +20 + + + + + + +0 +5 +10 +15 +20 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -184,70 +184,70 @@ -Multi-line labels -X line 1 -X line 2 +Multi-line labels +X line 1 +X line 2 Y line 1 Y line 2 - - - - - -5 -10 -15 -20 - - - - - - -0 -5 -10 -15 -20 - + + + + + +5 +10 +15 +20 + + + + + + +0 +5 +10 +15 +20 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -262,69 +262,69 @@ -Multi-line -main title -X +Multi-line +main title +X Y - - - - - -5 -10 -15 -20 - - - - - - -0 -5 -10 -15 -20 - + + + + + +5 +10 +15 +20 + + + + + + +0 +5 +10 +15 +20 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg b/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg index e07d83e3..74fdfe00 100644 --- a/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg +++ b/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg @@ -26,68 +26,68 @@ -sub 1 -sub 2 -main 1 -main 2 -xlab 1 -xlab 2 +sub 1 +sub 2 +main 1 +main 2 +xlab 1 +xlab 2 ylab 1 ylab 2 - - - - - - -2 -4 -6 -8 -10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_sub_na_bottom_legend.svg b/inst/tinytest/_tinysnapshot/margins_sub_na_bottom_legend.svg index 70168c2f..4cd3bb28 100644 --- a/inst/tinytest/_tinysnapshot/margins_sub_na_bottom_legend.svg +++ b/inst/tinytest/_tinysnapshot/margins_sub_na_bottom_legend.svg @@ -40,79 +40,79 @@ -wt +wt mpg - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg b/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg index 8c8c8017..8fa10b1c 100644 --- a/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg +++ b/inst/tinytest/_tinysnapshot/pointrange_with_layers_flipped.svg @@ -26,47 +26,47 @@ -y -x - - - - - - --10 -0 -10 -20 -30 - - - - - -(Intercept) -hp -factor(cyl)6 -factor(cyl)8 - +y +x + + + + + + +-10 +0 +10 +20 +30 + + + + + +(Intercept) +hp +factor(cyl)6 +factor(cyl)8 + - - + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge.svg index 5168817a..33dba352 100644 --- a/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge.svg @@ -26,49 +26,49 @@ -Sepal.Width +Sepal.Width Species - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 - + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + - - + + - - - - - - - - - - + + + + + + + + + + - - - - -setosa -versicolor -virginica + + + + +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge2.svg index f200d154..c17f25f3 100644 --- a/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_basic_theme_ridge2.svg @@ -26,44 +26,44 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - - - - - - - + + + + + + + + + + -setosa -versicolor -virginica - - - - - - - - +setosa +versicolor +virginica + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge.svg index 1cf08158..516ae051 100644 --- a/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge.svg @@ -45,1584 +45,1584 @@ -Sepal.Width +Sepal.Width Species - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 - + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - -setosa -versicolor -virginica + + + + +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge2.svg index 0c024823..cb86096a 100644 --- a/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_by_x_theme_ridge2.svg @@ -45,1579 +45,1579 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -setosa -versicolor -virginica - - - - - - - - +setosa +versicolor +virginica + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge.svg index a8f967fc..fc39f031 100644 --- a/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge.svg @@ -40,61 +40,61 @@ -Sepal.Width +Sepal.Width Species - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 - + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + - - + + - - - - + + + + - - -virginica + + +virginica - - - - + + + + - - -versicolor + + +versicolor - - - - + + + + - - -setosa + + +setosa diff --git a/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge2.svg index aacb5a6e..8d71c3f7 100644 --- a/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_by_y_theme_ridge2.svg @@ -40,70 +40,70 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - + + + + -virginica - - - - - - - - +virginica + + + + + + + + - - - - + + + + -versicolor - - - - - - - - +versicolor + + + + + + + + - - - - + + + + -setosa - - - - - - - - +setosa + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg index bf3be825..8cab593b 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge.svg @@ -26,7 +26,7 @@ -mpg +mpg am diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg index 1b895566..239e511b 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_facet_theme_ridge2.svg @@ -26,2139 +26,2139 @@ -mpg +mpg am - - + + - + -5 -10 -15 -20 -25 -30 -35 -40 - -0 +5 +10 +15 +20 +25 +30 +35 +40 + +0 - - + + - + -5 -10 -15 -20 -25 -30 -35 -40 - -1 +5 +10 +15 +20 +25 +30 +35 +40 + +1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0 -1 - - - - - - - - - +0 +1 + + + + + + + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge.svg index 10cfe16b..310e0e0b 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge.svg @@ -26,1582 +26,1582 @@ -Sepal.Width +Sepal.Width Species - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 - + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - -setosa -versicolor -virginica + + + + +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge2.svg b/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge2.svg index f18d999d..671561cc 100644 --- a/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/ridge_gradient_theme_ridge2.svg @@ -26,1577 +26,1577 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -setosa -versicolor -virginica - - - - - - - - +setosa +versicolor +virginica + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_theme_bg_numeric.svg b/inst/tinytest/_tinysnapshot/ridge_theme_bg_numeric.svg index 3c840d53..dc908bac 100644 --- a/inst/tinytest/_tinysnapshot/ridge_theme_bg_numeric.svg +++ b/inst/tinytest/_tinysnapshot/ridge_theme_bg_numeric.svg @@ -26,44 +26,44 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - - - - - - - + + + + + + + + + + -setosa -versicolor -virginica - - - - - - - - +setosa +versicolor +virginica + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ridge_theme_palette.svg b/inst/tinytest/_tinysnapshot/ridge_theme_palette.svg index 69fa6e1d..e029639a 100644 --- a/inst/tinytest/_tinysnapshot/ridge_theme_palette.svg +++ b/inst/tinytest/_tinysnapshot/ridge_theme_palette.svg @@ -26,48 +26,48 @@ -Sepal.Width +Sepal.Width Species -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + -setosa -versicolor -virginica +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/tinylabel.svg b/inst/tinytest/_tinysnapshot/tinylabel.svg index f89ccaa8..9bb689a6 100644 --- a/inst/tinytest/_tinysnapshot/tinylabel.svg +++ b/inst/tinytest/_tinysnapshot/tinylabel.svg @@ -45,109 +45,109 @@ -Income +Income Life.Exp - - - - - - - - -$3,000 -$3,500 -$4,000 -$4,500 -$5,000 -$5,500 -$6,000 - - - - - - - -68 -69 -70 -71 -72 -73 - + + + + + + + + +$3,000 +$3,500 +$4,000 +$4,500 +$5,000 +$5,500 +$6,000 + + + + + + + +68 +69 +70 +71 +72 +73 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg index 3580a418..769940e2 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("broadsheet") +tinytheme("broadsheet") @@ -39,73 +39,73 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 + + + + + + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg index b9d0a13c..e66a4e48 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("bw") +tinytheme("bw") @@ -39,99 +39,99 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg index 99df2d0d..f140e4f1 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("classic") +tinytheme("classic") @@ -39,75 +39,75 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_clean.svg b/inst/tinytest/_tinysnapshot/tinytheme_clean.svg index 4ad2e745..8bb46efd 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_clean.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_clean.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") +tinytheme("clean") @@ -39,86 +39,86 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg b/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg index 01c6017d..95c209b1 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean2") +tinytheme("clean2") @@ -39,72 +39,72 @@ -Title of the plot -hp +Title of the plot +hp mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg index f414eeec..fc9dfb29 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("dark") +tinytheme("dark") @@ -39,85 +39,85 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg index d748170b..6e7f750b 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("dynamic") +tinytheme("dynamic") @@ -39,75 +39,75 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg index d607a6c3..e678626c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg @@ -26,104 +26,104 @@ -Flipped boxplot version -Dynamic plot adjustment and whitespace reduction -weight +Flipped boxplot version +Dynamic plot adjustment and whitespace reduction +weight feed - - - - - - - -casein -horsebean -linseed -meatmeal -soybean -sunflower - - - - - - - - -100 -150 -200 -250 -300 -350 -400 - + + + + + + + +casein +horsebean +linseed +meatmeal +soybean +sunflower + + + + + + + + +100 +150 +200 +250 +300 +350 +400 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg index 74bf61ee..4d16fea8 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -41,216 +41,216 @@ -Dynamic plot adjustment and whitespace reduction -Petal.Length +Dynamic plot adjustment and whitespace reduction +Petal.Length I(Sepal.Length * 1e+09) - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - - - - - - - - - -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + + + + + + + + + +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg index b43fa4e0..ee94b583 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg @@ -36,7 +36,7 @@ - - - - disp -Works with facets too +Works with facets too @@ -44,345 +44,345 @@ -Dynamic plot adjustment and whitespace reduction -I(hp * 100) -I(mpg * 1000) +Dynamic plot adjustment and whitespace reduction +I(hp * 100) +I(mpg * 1000) - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -0 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +0 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -1 - -4 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +1 + +4 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -6 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +6 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -8 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +8 + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg index c2d285c7..ec5e71d7 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg @@ -26,93 +26,93 @@ -Spineplot version -Dynamic plot adjustment and whitespace reduction -Petal.Length +Spineplot version +Dynamic plot adjustment and whitespace reduction +Petal.Length Species - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + -1 -1.5 -2 -4 -4.5 -5 -5.5 -6 +1 +1.5 +2 +4 +4.5 +5 +5.5 +6 7 -virginica -versicolor -setosa +virginica +versicolor +setosa @@ -126,7 +126,7 @@ 0.6 0.8 1.0 - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg index 11c55a7a..2a7007fd 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -41,215 +41,215 @@ -Dynamic plot adjustment and whitespace reduction -Petal.Length -I(Sepal.Length * 1e+09) +Dynamic plot adjustment and whitespace reduction +Petal.Length +I(Sepal.Length * 1e+09) -1 -2 -3 -4 -5 -6 -7 -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 +1 +2 +3 +4 +5 +6 +7 +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg index 5fdeafe1..8ac3735a 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg @@ -36,7 +36,7 @@ - - - - disp -Works with facets too +Works with facets too @@ -44,307 +44,307 @@ -Dynamic plot adjustment and whitespace reduction -I(hp * 100) -I(mpg * 1000) +Dynamic plot adjustment and whitespace reduction +I(hp * 100) +I(mpg * 1000) - - + + - + -10000 -15000 -20000 -25000 -30000 - -0 +10000 +15000 +20000 +25000 +30000 + +0 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -1 - -4 + +1 + +4 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -6 + +6 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -5000 -10000 -15000 -20000 -25000 -30000 -10000 -15000 -20000 -25000 -30000 +5000 +10000 +15000 +20000 +25000 +30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -5000 -10000 -15000 -20000 -25000 -30000 - -8 +5000 +10000 +15000 +20000 +25000 +30000 + +8 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg index 6df3d7df..3c06e604 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -41,201 +41,201 @@ -Dynamic plot adjustment and whitespace reduction -Petal.Length +Dynamic plot adjustment and whitespace reduction +Petal.Length I(Sepal.Length * 1e+09) - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - - - - - - - - - -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + + + + + + + + + +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg index e64cbd3c..bab8474c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg @@ -26,130 +26,130 @@ -Flipped jitter plot version -Dynamic plot adjustment and whitespace reduction -weight +Flipped jitter plot version +Dynamic plot adjustment and whitespace reduction +weight feed - - - - - - - - -100 -150 -200 -250 -300 -350 -400 - - - - - - - -casein -horsebean -linseed -meatmeal -soybean -sunflower - + + + + + + + + +100 +150 +200 +250 +300 +350 +400 + + + + + + + +casein +horsebean +linseed +meatmeal +soybean +sunflower + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg index 4ea57844..3ee901df 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg @@ -26,51 +26,51 @@ -Ridge plot version -Dynamic plot adjustment and whitespace reduction -Petal.Length +Ridge plot version +Dynamic plot adjustment and whitespace reduction +Petal.Length Species - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + - - + + - - - - - - - - - - + + + + + + + + + + - - - - -setosa -versicolor -virginica + + + + +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg index d538e0c9..724fc4a0 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg @@ -26,104 +26,104 @@ -Works for perpendicular x-axis labels too -Dynamic plot adjustment and whitespace reduction -feed -weight - - - - - - - -casein -horsebean -linseed -meatmeal -soybean -sunflower - - - - - - - - -100 -150 -200 -250 -300 -350 -400 - +Works for perpendicular x-axis labels too +Dynamic plot adjustment and whitespace reduction +feed +weight + + + + + + + +casein +horsebean +linseed +meatmeal +soybean +sunflower + + + + + + + + +100 +150 +200 +250 +300 +350 +400 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_yaxl.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_yaxl.svg index a99ea0d4..e8ca35f8 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_yaxl.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_yaxl.svg @@ -26,118 +26,118 @@ -treatment +treatment I(decrease/100) - - - - - - - - - -A -B -C -D -E -F -G -H - - - - - - - - -0% -20% -40% -60% -80% -100% -120% - + + + + + + + + + +A +B +C +D +E +F +G +H + + + + + + + + +0% +20% +40% +60% +80% +100% +120% + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynmar_mar_override.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynmar_mar_override.svg index 94c2b225..26b4e770 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynmar_mar_override.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynmar_mar_override.svg @@ -26,52 +26,52 @@ -Custom mar override -Index +Custom mar override +Index 0:10 - - - - - - -2 -4 -6 -8 -10 - - - - - - - -0 -2 -4 -6 -8 -10 - + + + + + + +2 +4 +6 +8 +10 + + + + + + + +0 +2 +4 +6 +8 +10 + - - + + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ephemeral.svg b/inst/tinytest/_tinysnapshot/tinytheme_ephemeral.svg index 7bbcf082..2dd1763e 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ephemeral.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ephemeral.svg @@ -33,222 +33,222 @@ -Ephemeral theme -Petal.Length +Ephemeral theme +Petal.Length Sepal.Length - - - - - - - - -1 -2 -3 -4 -5 -6 -7 - - - - - - - - - -4.5 -5.0 -5.5 -6.0 -6.5 -7.0 -7.5 -8.0 - + + + + + + + + +1 +2 +3 +4 +5 +6 +7 + + + + + + + + + +4.5 +5.0 +5.5 +6.0 +6.5 +7.0 +7.5 +8.0 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg index 8bb6de41..3982190c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ipsum") +tinytheme("ipsum") @@ -39,85 +39,85 @@ -Title of the plot +Title of the plot hp -mpg +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg index 4bd17368..576dcd40 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ipsum2") +tinytheme("ipsum2") @@ -39,85 +39,85 @@ -Title of the plot +Title of the plot hp -mpg +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg b/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg index c0794510..54891c0a 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") + legend = "bottom!" +tinytheme("clean") + legend = "bottom!" @@ -39,86 +39,86 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg b/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg index 345a484c..d2b59e34 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") + legend = "left!" +tinytheme("clean") + legend = "left!" @@ -39,86 +39,86 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg index 6d094249..2b014c07 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("minimal") +tinytheme("minimal") @@ -39,85 +39,85 @@ -Title of the plot -hp -mpg +Title of the plot +hp +mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_nber.svg b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg index 30411102..5565421e 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_nber.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("nber") +tinytheme("nber") @@ -39,73 +39,73 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 + + + + + + + +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg b/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg index a5a2569b..da7800a1 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ridge") +tinytheme("ridge") @@ -39,75 +39,75 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg b/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg index a4bf50c7..a2ecbcc2 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ridge2") +tinytheme("ridge2") @@ -39,61 +39,61 @@ -Title of the plot -hp +Title of the plot +hp mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg index 868013c6..27af09fa 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("socviz") +tinytheme("socviz") @@ -39,99 +39,99 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - -50 -100 -150 -200 -250 -300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + + +50 +100 +150 +200 +250 +300 + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg index 85b77492..9838736f 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("tufte") +tinytheme("tufte") @@ -39,101 +39,101 @@ -Title of the plot -hp +Title of the plot +hp mpg - - - - - - - - - - - - - - - - -60 -80 -120 -160 -200 -240 -280 -320 - - - - - - - - - - - - - - -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30 -32 -34 + + + + + + + + + + + + + + + + +60 +80 +120 +160 +200 +240 +280 +320 + + + + + + + + + + + + + + +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +30 +32 +34 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_void.svg b/inst/tinytest/_tinysnapshot/tinytheme_void.svg index 7c468437..986b4384 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_void.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_void.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("void") +tinytheme("void") @@ -39,48 +39,48 @@ -Title of the plot -hp +Title of the plot +hp mpg - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_web.svg b/inst/tinytest/_tinysnapshot/tinytheme_web.svg index 98fde2aa..a3915d36 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_web.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_web.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("web") +tinytheme("web") @@ -39,72 +39,72 @@ -Title of the plot -hp +Title of the plot +hp mpg -50 -100 -150 -200 -250 -300 -10 -15 -20 -25 -30 +50 +100 +150 +200 +250 +300 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From eca4c62a16f2301abe5a6c621cff4ca8d107f307 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 16:21:26 -0700 Subject: [PATCH 11/13] more tests --- .../_tinysnapshot/margins_whtsbp_1digit.svg | 40 +++++++++++++ .../_tinysnapshot/margins_whtsbp_2digit.svg | 40 +++++++++++++ .../_tinysnapshot/margins_whtsbp_3digit.svg | 40 +++++++++++++ .../margins_whtsbp_degenerate.svg | 56 +++++++++++++++++++ inst/tinytest/test-margins.R | 31 +++++++++- 5 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 inst/tinytest/_tinysnapshot/margins_whtsbp_1digit.svg create mode 100644 inst/tinytest/_tinysnapshot/margins_whtsbp_2digit.svg create mode 100644 inst/tinytest/_tinysnapshot/margins_whtsbp_3digit.svg create mode 100644 inst/tinytest/_tinysnapshot/margins_whtsbp_degenerate.svg diff --git a/inst/tinytest/_tinysnapshot/margins_whtsbp_1digit.svg b/inst/tinytest/_tinysnapshot/margins_whtsbp_1digit.svg new file mode 100644 index 00000000..4b5d19dd --- /dev/null +++ b/inst/tinytest/_tinysnapshot/margins_whtsbp_1digit.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + +Xx +Yy + + +1 + + +1 + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_whtsbp_2digit.svg b/inst/tinytest/_tinysnapshot/margins_whtsbp_2digit.svg new file mode 100644 index 00000000..319b7bf4 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/margins_whtsbp_2digit.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + +Xx +Yy + + +1 + + +10 + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_whtsbp_3digit.svg b/inst/tinytest/_tinysnapshot/margins_whtsbp_3digit.svg new file mode 100644 index 00000000..b7146990 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/margins_whtsbp_3digit.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + +Xx +Yy + + +1 + + +100 + + + + diff --git a/inst/tinytest/_tinysnapshot/margins_whtsbp_degenerate.svg b/inst/tinytest/_tinysnapshot/margins_whtsbp_degenerate.svg new file mode 100644 index 00000000..79cc3ee5 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/margins_whtsbp_degenerate.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + +Xx +Yy + + + + + + +0.6 +0.8 +1.0 +1.2 +1.4 + + + + + + +0.6 +0.8 +1.0 +1.2 +1.4 + + + + diff --git a/inst/tinytest/test-margins.R b/inst/tinytest/test-margins.R index efddc6e5..d2d05a78 100644 --- a/inst/tinytest/test-margins.R +++ b/inst/tinytest/test-margins.R @@ -204,4 +204,33 @@ f = function() { box("inner", lty = 2) tinytheme() } -expect_snapshot_plot(f, label = "margins_cex_axis3_lab3") \ No newline at end of file +expect_snapshot_plot(f, label = "margins_cex_axis3_lab3") + +# Consistent y-title gap across label widths (#596) +f = function() { + tinytheme("bw", grid = FALSE) + tinyplot(1, xlab = "Xx", ylab = "Yy", type = "n") + tinytheme() +} +expect_snapshot_plot(f, label = "margins_whtsbp_degenerate") + +f = function() { + tinytheme("bw", grid = FALSE) + tinyplot(1, yaxb = 1, xaxb = 1, xlab = "Xx", ylab = "Yy", type = "n") + tinytheme() +} +expect_snapshot_plot(f, label = "margins_whtsbp_1digit") + +f = function() { + tinytheme("bw", grid = FALSE) + tinyplot(10, yaxb = 10, xaxb = 1, xlab = "Xx", ylab = "Yy", type = "n") + tinytheme() +} +expect_snapshot_plot(f, label = "margins_whtsbp_2digit") + +f = function() { + tinytheme("bw", grid = FALSE) + tinyplot(100, yaxb = 100, xaxb = 1, xlab = "Xx", ylab = "Yy", type = "n") + tinytheme() +} +expect_snapshot_plot(f, label = "margins_whtsbp_3digit") \ No newline at end of file From ec7e2f5f6c204c5c4612603efb0b70633da935e0 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 18:05:07 -0700 Subject: [PATCH 12/13] add `gap.main` and `gap.sub` for better spacing between titles - issue #597 --- R/tinyplot.R | 2 +- R/tinytheme.R | 2 + R/title.R | 21 +- R/tpar.R | 4 + R/utils.R | 18 +- .../margins_multiline_labels.svg | 86 +-- .../_tinysnapshot/tinytheme_broadsheet.svg | 94 +-- inst/tinytest/_tinysnapshot/tinytheme_bw.svg | 146 ++--- .../_tinysnapshot/tinytheme_classic.svg | 98 ++-- .../_tinysnapshot/tinytheme_clean.svg | 120 ++-- .../_tinysnapshot/tinytheme_clean2.svg | 106 ++-- .../tinytest/_tinysnapshot/tinytheme_dark.svg | 132 ++--- .../_tinysnapshot/tinytheme_dynamic.svg | 98 ++-- .../tinytheme_dynamic_boxplot_flip.svg | 154 ++--- .../_tinysnapshot/tinytheme_dynamic_clean.svg | 376 ++++++------ .../tinytheme_dynamic_clean_facet.svg | 534 +++++++++--------- .../tinytheme_dynamic_clean_spineplot.svg | 120 ++-- .../_tinysnapshot/tinytheme_dynamic_dark.svg | 390 ++++++------- .../tinytheme_dynamic_dark_facet.svg | 472 ++++++++-------- .../tinytheme_dynamic_dynamic.svg | 346 ++++++------ .../tinytheme_dynamic_jitter_flip.svg | 206 +++---- .../_tinysnapshot/tinytheme_dynamic_ridge.svg | 44 +- .../tinytheme_dynamic_x_boxplot.svg | 158 +++--- .../_tinysnapshot/tinytheme_ipsum.svg | 132 ++--- .../_tinysnapshot/tinytheme_ipsum2.svg | 132 ++--- .../_tinysnapshot/tinytheme_legend_bottom.svg | 120 ++-- .../_tinysnapshot/tinytheme_legend_left.svg | 120 ++-- .../_tinysnapshot/tinytheme_minimal.svg | 132 ++--- .../tinytest/_tinysnapshot/tinytheme_nber.svg | 94 +-- .../_tinysnapshot/tinytheme_ridge.svg | 98 ++-- .../_tinysnapshot/tinytheme_ridge2.svg | 84 +-- .../_tinysnapshot/tinytheme_socviz.svg | 146 ++--- .../_tinysnapshot/tinytheme_tufte.svg | 128 ++--- .../tinytest/_tinysnapshot/tinytheme_void.svg | 74 +-- inst/tinytest/_tinysnapshot/tinytheme_web.svg | 106 ++-- man/tpar.Rd | 2 + man/type_density.Rd | 2 +- man/type_jitter.Rd | 31 +- man/type_ridge.Rd | 2 +- man/type_spline.Rd | 2 +- man/type_violin.Rd | 2 +- 41 files changed, 2565 insertions(+), 2569 deletions(-) diff --git a/R/tinyplot.R b/R/tinyplot.R index 8fe049a6..8c638dac 100644 --- a/R/tinyplot.R +++ b/R/tinyplot.R @@ -1031,7 +1031,7 @@ tinyplot.default = function( get(paste0("theme_", .tinytheme), envir = asNamespace("tinyplot")) } else NULL .theme_mar = if (!is.null(.theme_def[["mar"]])) .theme_def[["mar"]] else par("mar") - .tpars = if (!is.null(.theme_def)) .theme_def else tpar() + .tpars = if (!is.null(.theme_def)) modifyList(.theme_def, tpar()) else tpar() # Merge pending before.plot.new hook values into .tpars so user # overrides passed via tinytheme(..., las = 2) (or tpar(...)) are # visible to dynmar_side()/whtsbp before plot.new fires. Without this, diff --git a/R/tinytheme.R b/R/tinytheme.R index 5bb9e6c2..24adcd32 100644 --- a/R/tinytheme.R +++ b/R/tinytheme.R @@ -368,6 +368,8 @@ theme_dynamic = modifyList(theme_basic, list( dynmar = TRUE, gap.axis = 0.2, # gap (lines) between tick tip and tick label cell edge gap.lab = 1.0, # gap (lines) from tick label cell edge to title cell edge + gap.main = 0.7, # gap (lines) from main baseline to element below (plot or sub top) + gap.sub = 0.7, # gap (lines) from sub baseline to plot box grid = FALSE, las = 1, mar = c(0.1, 0.1, 0.6, 0.6), diff --git a/R/title.R b/R/title.R index 2992240e..1dc27da7 100644 --- a/R/title.R +++ b/R/title.R @@ -23,28 +23,29 @@ draw_title = function(main, sub, cap, xlab, ylab, legend, legend_args, opar, if (isTRUE(adj_title)) { line_main = par("mar")[3] - opar[["mar"]][3] + 1.7 + 0.1 } else if (isTRUE(get_tpar("dynmar", FALSE))) { - # Anchor main at a fixed line above the plot box so it stays in the same - # position regardless of whether sub is also present (the sub branch - # below adds a +1.2 shift on top of this baseline when needed). - line_main = get_tpar("mgp")[3] + 0.7 - 0.1 + gap_main = get_tpar("gap.main", 0.7) + line_main = get_tpar("mgp")[3] + gap_main - 0.1 } else { line_main = NULL } # When sub sits on top (side.sub == 3), push main up by the sub block - # height so main is above sub rather than overlapping it. Treat NA/empty - # sub as absent so main stays at its normal position. First sub row gets - # a small (0.2-line) extra bump for visual breathing room. + # height so main is above sub rather than overlapping it. sub_lines = text_line_count(sub) if (sub_lines > 0L && isTRUE(get_tpar("side.sub", 1) == 3)) { - if (is.null(line_main)) line_main = get_tpar("mgp")[3] + 0.7 - 0.1 + if (is.null(line_main)) { + gap_main = get_tpar("gap.main", 0.7) + line_main = get_tpar("mgp")[3] + gap_main - 0.1 + } cex_sub = get_tpar("cex.sub", 1.2) - line_main = line_main + (cex_sub + 0.2) + (sub_lines - 1) * cex_sub + gap_sub = get_tpar("gap.sub", 0.7) + line_main = line_main + gap_sub + (sub_lines - 1 + 0.6) * cex_sub } if (!is.null(sub)) { if (isTRUE(get_tpar("side.sub", 1) == 3)) { - line_sub = get_tpar("line.sub", 0.7) + gap_sub = get_tpar("gap.sub", 0.7) + line_sub = get_tpar("line.sub", gap_sub - 0.1) } else { line_sub = get_tpar("line.sub", 4) } diff --git a/R/tpar.R b/R/tpar.R index e86757e3..3b437c1c 100644 --- a/R/tpar.R +++ b/R/tpar.R @@ -67,6 +67,8 @@ #' * `file.res`: Numeric specifying the resolution (in dots per square inch) of any plot that is written to disk in bitmap format (i.e., PNG or JPEG) using the `tinyplot(..., file = X)` argument. Defaults to `300`. #' * `file.width`: Numeric specifying the width (in inches) of any plot that is written to disk using the `tinyplot(..., file = X)` argument. Defaults to `7`. #' * `fmar`: A numeric vector of form `c(b,l,t,r)` for controlling the (base) margin padding, in terms of lines, between the individual facets in a faceted plot. Defaults to `c(1,1,1,1)`. If more than three facets are detected, the `fmar` parameter is scaled by 0.75 to reduce excess whitespace. For 2x2 plots, the padding better matches the `cex` expansion logic of base graphics. +#' * `gap.main`: Numeric giving the gap (in margin lines) from the main title baseline to the element below it (plot box when no subtitle; subtitle top when subtitle is present). Only used when `dynmar = TRUE`. Defaults to `0.7`. +#' * `gap.sub`: Numeric giving the gap (in margin lines) from the subtitle baseline to the plot box. Only used when `dynmar = TRUE` and `side.sub = 3`. Defaults to `0.7`. #' * `grid.col`: Character or (integer) numeric that specifies the color of the panel grid lines. Defaults to `"lightgray"`. #' * `grid.lty`: Character or (integer) numeric that specifies the line type of the panel grid lines. Defaults to `"dotted"`. #' * `grid.lwd`: Non-negative numeric giving the line width of the panel grid lines. Defaults to `1`. @@ -239,6 +241,8 @@ known_tpar = c( "font.cap", "gap.axis", "gap.lab", + "gap.main", + "gap.sub", "facet.bg", "facet.border", "facet.cex", diff --git a/R/utils.R b/R/utils.R index fe0f7025..18d6ebc8 100644 --- a/R/utils.R +++ b/R/utils.R @@ -67,27 +67,17 @@ dynmar_side = function(side, label, main = NULL, sub = NULL, cap = NULL, mlines = text_line_count(main) if (mlines >= 1L) { cex_main = get_tpar("cex.main", tpar_list = tpars, default = 1.2) - # 0.7 = distance (in lines) from plot box to main baseline. Matches - # line_main = mgp[3] + 0.7 - 0.1 in draw_title (mgp[3] default 0). - # Chosen to visually match base R's default title gap at cex.main=1.2 - # with par(mar=c(5.1,4.1,4.1,2.1), mgp=c(3,1,0)). - # 0.6 = empirical ascender fraction: the top line's visible extent - # reaches ~0.6 * cex_main above its baseline. Derived from - # strheight("X") / par("csi") ≈ 0.6 on standard devices. - mar = mar + 0.7 + (mlines - 1 + 0.6) * cex_main + gap_main = get_tpar("gap.main", tpar_list = tpars, default = 0.7) + mar = mar + gap_main + (mlines - 1 + 0.6) * cex_main } } slines = text_line_count(sub) if (slines >= 1L && side == side.sub && side %in% c(1L, 3L)) { cex_sub = get_tpar("cex.sub", tpar_list = tpars, default = 1.2) - # Sub sits between the plot box and main (when side.sub = 3). - # 0.2 = breathing room between sub baseline and the element above it - # (plot box or main). Tuned visually to avoid crowding at default cex. - # 0.6 = same ascender fraction as main (see above). Applied only when - # main is absent, since main's ascender already covers the top. + gap_sub = get_tpar("gap.sub", tpar_list = tpars, default = 0.7) has_main_here = side == 3L && text_line_count(main) >= 1L asc = if (has_main_here) 0 else 0.6 * cex_sub - mar = mar + (cex_sub + 0.2) + (slines - 1) * cex_sub + asc + mar = mar + gap_sub + (slines - 1 + 0.6) * cex_sub + asc } clines = text_line_count(cap) if (clines >= 1L && side == 1L) { diff --git a/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg b/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg index 74fdfe00..4dbe2fd8 100644 --- a/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg +++ b/inst/tinytest/_tinysnapshot/margins_multiline_labels.svg @@ -26,14 +26,14 @@ -sub 1 -sub 2 +sub 1 +sub 2 main 1 main 2 xlab 1 xlab 2 -ylab 1 -ylab 2 +ylab 1 +ylab 2 @@ -45,49 +45,49 @@ 6 8 10 - - - - - - - -1000 -1002 -1004 -1006 -1008 -1010 - + + + + + + + +1000 +1002 +1004 +1006 +1008 +1010 + - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg index 769940e2..ce08192e 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_broadsheet.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("broadsheet") +tinytheme("broadsheet") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,55 +57,55 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg index e66a4e48..6f793ac8 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_bw.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_bw.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("bw") +tinytheme("bw") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,81 +57,81 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg index f140e4f1..d3c2a128 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_classic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_classic.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("classic") +tinytheme("classic") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,57 +57,57 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_clean.svg b/inst/tinytest/_tinysnapshot/tinytheme_clean.svg index 8bb46efd..268bce6b 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_clean.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_clean.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") +tinytheme("clean") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,68 +57,68 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg b/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg index 95c209b1..607de504 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_clean2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean2") +tinytheme("clean2") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,61 +50,61 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg index fc9dfb29..d781b86d 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dark.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("dark") +tinytheme("dark") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,74 +50,74 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg index 6e7f750b..cf3219d2 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("dynamic") +tinytheme("dynamic") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,57 +57,57 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg index e678626c..5714b287 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_boxplot_flip.svg @@ -26,23 +26,23 @@ -Flipped boxplot version +Flipped boxplot version Dynamic plot adjustment and whitespace reduction weight -feed - - - - - - - -casein -horsebean -linseed -meatmeal -soybean -sunflower +feed + + + + + + + +casein +horsebean +linseed +meatmeal +soybean +sunflower @@ -58,72 +58,72 @@ 300 350 400 - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg index 4d16fea8..d3caf7f8 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -43,7 +43,7 @@ Dynamic plot adjustment and whitespace reduction Petal.Length -I(Sepal.Length * 1e+09) +I(Sepal.Length * 1e+09) @@ -61,196 +61,196 @@ 5 6 7 - - - - - - - - - -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 - + + + + + + + + + +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg index ee94b583..be718038 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_facet.svg @@ -36,7 +36,7 @@ - - - - disp -Works with facets too +Works with facets too @@ -46,210 +46,210 @@ Dynamic plot adjustment and whitespace reduction I(hp * 100) -I(mpg * 1000) +I(mpg * 1000) - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -0 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +0 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -1 - -4 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +1 + +4 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + - - - - - - - -5000 -10000 -15000 -20000 -25000 -30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -6 - + + + + + + + +5000 +10000 +15000 +20000 +25000 +30000 + + + + + + +10000 +15000 +20000 +25000 +30000 + +6 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + @@ -265,38 +265,38 @@ 20000 25000 30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - + + + + + + +10000 +15000 +20000 +25000 +30000 + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - + @@ -312,84 +312,84 @@ 20000 25000 30000 - - - - - - -10000 -15000 -20000 -25000 -30000 - -8 - + + + + + + +10000 +15000 +20000 +25000 +30000 + +8 + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg index ec5e71d7..99c5203c 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_clean_spineplot.svg @@ -26,65 +26,65 @@ -Spineplot version +Spineplot version Dynamic plot adjustment and whitespace reduction Petal.Length -Species +Species - - + + - - - - - - - + + + + + + + - - - - - + + + + + - + - - - - + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -110,23 +110,23 @@ 5.5 6 7 -virginica -versicolor -setosa - +virginica +versicolor +setosa + - - - - - + + + + + 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 - +0.2 +0.4 +0.6 +0.8 +1.0 + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg index 2a7007fd..48146bf2 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -43,7 +43,7 @@ Dynamic plot adjustment and whitespace reduction Petal.Length -I(Sepal.Length * 1e+09) +I(Sepal.Length * 1e+09) 1 @@ -53,203 +53,203 @@ 5 6 7 -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg index 8ac3735a..6d78e077 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dark_facet.svg @@ -36,7 +36,7 @@ - - - - disp -Works with facets too +Works with facets too @@ -46,172 +46,172 @@ Dynamic plot adjustment and whitespace reduction I(hp * 100) -I(mpg * 1000) +I(mpg * 1000) - - + + - + -10000 -15000 -20000 -25000 -30000 - -0 +10000 +15000 +20000 +25000 +30000 + +0 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -1 - -4 + +1 + +4 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - -6 + +6 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + 5000 @@ -220,44 +220,44 @@ 20000 25000 30000 -10000 -15000 -20000 -25000 -30000 +10000 +15000 +20000 +25000 +30000 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + 5000 @@ -266,85 +266,85 @@ 20000 25000 30000 - -8 + +8 - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg index 3c06e604..733218e4 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_dynamic.svg @@ -33,7 +33,7 @@ setosa versicolor virginica -For themes with las = 1, etc. +For themes with las = 1, etc. @@ -43,7 +43,7 @@ Dynamic plot adjustment and whitespace reduction Petal.Length -I(Sepal.Length * 1e+09) +I(Sepal.Length * 1e+09) @@ -61,181 +61,181 @@ 5 6 7 - - - - - - - - - -4.5e+09 -5.0e+09 -5.5e+09 -6.0e+09 -6.5e+09 -7.0e+09 -7.5e+09 -8.0e+09 - + + + + + + + + + +4.5e+09 +5.0e+09 +5.5e+09 +6.0e+09 +6.5e+09 +7.0e+09 +7.5e+09 +8.0e+09 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg index bab8474c..9f669eb8 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_jitter_flip.svg @@ -26,10 +26,10 @@ -Flipped jitter plot version +Flipped jitter plot version Dynamic plot adjustment and whitespace reduction weight -feed +feed @@ -45,111 +45,111 @@ 300 350 400 - - - - - - - -casein -horsebean -linseed -meatmeal -soybean -sunflower - + + + + + + + +casein +horsebean +linseed +meatmeal +soybean +sunflower + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg index 3ee901df..b78d660f 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_ridge.svg @@ -26,10 +26,10 @@ -Ridge plot version +Ridge plot version Dynamic plot adjustment and whitespace reduction Petal.Length -Species +Species @@ -45,32 +45,32 @@ 5 6 7 - + - - + + - - - - - - - - - - + + + + + + + + + + - - - - -setosa -versicolor -virginica + + + + +setosa +versicolor +virginica diff --git a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg index 724fc4a0..b02c2e41 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_dynamic_x_boxplot.svg @@ -26,10 +26,10 @@ -Works for perpendicular x-axis labels too +Works for perpendicular x-axis labels too Dynamic plot adjustment and whitespace reduction feed -weight +weight @@ -43,87 +43,87 @@ meatmeal soybean sunflower - - - - - - - - -100 -150 -200 -250 -300 -350 -400 - + + + + + + + + +100 +150 +200 +250 +300 +350 +400 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg index 3982190c..e0961a93 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ipsum") +tinytheme("ipsum") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,74 +50,74 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg index 576dcd40..7e5f97c0 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ipsum2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ipsum2") +tinytheme("ipsum2") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,74 +50,74 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg b/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg index 54891c0a..0833ebf2 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_legend_bottom.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") + legend = "bottom!" +tinytheme("clean") + legend = "bottom!" @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,68 +57,68 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg b/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg index d2b59e34..aef894c6 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_legend_left.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("clean") + legend = "left!" +tinytheme("clean") + legend = "left!" @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,68 +57,68 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg index 2b014c07..ecc39d3d 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_minimal.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("minimal") +tinytheme("minimal") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,74 +50,74 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_nber.svg b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg index 5565421e..277aec5a 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_nber.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_nber.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("nber") +tinytheme("nber") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,55 +57,55 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg b/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg index da7800a1..f18fefed 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ridge.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ridge") +tinytheme("ridge") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,57 +57,57 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg b/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg index a2ecbcc2..b3e694c1 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_ridge2.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("ridge2") +tinytheme("ridge2") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,50 +50,50 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg index 27af09fa..b9e73f45 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_socviz.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("socviz") +tinytheme("socviz") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -57,81 +57,81 @@ 200 250 300 - - - - - - -10 -15 -20 -25 -30 - + + + + + + +10 +15 +20 +25 +30 + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg index 9838736f..65a3e747 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_tufte.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("tufte") +tinytheme("tufte") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg @@ -68,72 +68,72 @@ 240 280 320 - - - - - - - - - - - - - - -10 -12 -14 -16 -18 -20 -22 -24 -26 -28 -30 -32 -34 + + + + + + + + + + + + + + +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +30 +32 +34 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_void.svg b/inst/tinytest/_tinysnapshot/tinytheme_void.svg index 986b4384..f2a15469 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_void.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_void.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("void") +tinytheme("void") @@ -41,46 +41,46 @@ Title of the plot hp -mpg +mpg - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/tinytheme_web.svg b/inst/tinytest/_tinysnapshot/tinytheme_web.svg index a3915d36..8f71f1cf 100644 --- a/inst/tinytest/_tinysnapshot/tinytheme_web.svg +++ b/inst/tinytest/_tinysnapshot/tinytheme_web.svg @@ -31,7 +31,7 @@ factor(am) 0 1 -tinytheme("web") +tinytheme("web") @@ -41,7 +41,7 @@ Title of the plot hp -mpg +mpg 50 @@ -50,61 +50,61 @@ 200 250 300 -10 -15 -20 -25 -30 +10 +15 +20 +25 +30 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/man/tpar.Rd b/man/tpar.Rd index 8cf705ca..ccfe92a9 100644 --- a/man/tpar.Rd +++ b/man/tpar.Rd @@ -78,6 +78,8 @@ you should rather use \code{par()} instead. \item \code{file.res}: Numeric specifying the resolution (in dots per square inch) of any plot that is written to disk in bitmap format (i.e., PNG or JPEG) using the \code{tinyplot(..., file = X)} argument. Defaults to \code{300}. \item \code{file.width}: Numeric specifying the width (in inches) of any plot that is written to disk using the \code{tinyplot(..., file = X)} argument. Defaults to \code{7}. \item \code{fmar}: A numeric vector of form \code{c(b,l,t,r)} for controlling the (base) margin padding, in terms of lines, between the individual facets in a faceted plot. Defaults to \code{c(1,1,1,1)}. If more than three facets are detected, the \code{fmar} parameter is scaled by 0.75 to reduce excess whitespace. For 2x2 plots, the padding better matches the \code{cex} expansion logic of base graphics. +\item \code{gap.main}: Numeric giving the gap (in margin lines) from the main title baseline to the element below it (plot box when no subtitle; subtitle top when subtitle is present). Only used when \code{dynmar = TRUE}. Defaults to \code{0.7}. +\item \code{gap.sub}: Numeric giving the gap (in margin lines) from the subtitle baseline to the plot box. Only used when \code{dynmar = TRUE} and \code{side.sub = 3}. Defaults to \code{0.7}. \item \code{grid.col}: Character or (integer) numeric that specifies the color of the panel grid lines. Defaults to \code{"lightgray"}. \item \code{grid.lty}: Character or (integer) numeric that specifies the line type of the panel grid lines. Defaults to \code{"dotted"}. \item \code{grid.lwd}: Non-negative numeric giving the line width of the panel grid lines. Defaults to \code{1}. diff --git a/man/type_density.Rd b/man/type_density.Rd index 27fe4378..705ddc02 100644 --- a/man/type_density.Rd +++ b/man/type_density.Rd @@ -24,7 +24,7 @@ type_density( \code{"nrd0"}, has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., \code{"SJ"} would rather fit, see also - Venables and Ripley (2002). + {\if{html}{\cite{}\out{}}Venables and Ripley (2002)\if{html}{\out{}}}. The specified (or computed) value of \code{bw} is multiplied by \code{adjust}. diff --git a/man/type_jitter.Rd b/man/type_jitter.Rd index 0f71f7d5..daaf52dd 100644 --- a/man/type_jitter.Rd +++ b/man/type_jitter.Rd @@ -7,33 +7,30 @@ type_jitter(factor = 1, amount = NULL) } \arguments{ -\item{factor}{numeric.} +\item{factor}{numeric; used in calculation of \code{amount} when + the provided \code{amount} is 0 or \code{NULL}.} -\item{amount}{numeric; if positive, used as \emph{amount} (see below), - otherwise, if \code{= 0} the default is \code{factor * z/50}. - - Default (\code{NULL}): \code{factor * d/5} where \code{d} is about - the smallest difference between \code{x} values.} +\item{amount}{number or \code{NULL}; when positive, specifies + the amount of jitter; see Details, also for other cases.} } \description{ Type function for plotting jittered points. Arguments are passed to \code{\link[base]{jitter}}. } \details{ -The result, say \code{r}, is \code{r <- x + runif(n, -a, a)} - where \code{n <- length(x)} and \code{a} is the \code{amount} - argument (if specified). +The result of \code{r <- x + amount * runif(n, -1, 1)} + where \code{n <- length(x)}. - Let \code{z <- max(x) - min(x)} (assuming the usual case). - The amount \code{a} to be added is either provided as \emph{positive} - argument \code{amount} or otherwise computed from \code{z}, as - follows: + When \code{amount} is \code{NULL} (the default) + \code{amount <- factor * d/5} where \emph{d} is about the smallest + difference between adjacent unique (up to fuzz) \code{x} values. - If \code{amount == 0}, we set \code{a <- factor * z/50} (same as S). + If \code{amount == 0}, \code{amount <- factor * (max(x) - min(x))/50}, + (using only finite \code{x} values), which is the same as in S and the + references. + In the above cases, the final \code{amount} is always ensured to be positive. - If \code{amount} is \code{NULL} (\emph{default}), we set - \code{a <- factor * d/5} where \emph{d} is the smallest - difference between adjacent unique (apart from fuzz) \code{x} values. + The short \code{jitter()} function is itself a succinct definition. } \examples{ # "jitter" type convenience string diff --git a/man/type_ridge.Rd b/man/type_ridge.Rd index 1774c744..e9b3b40a 100644 --- a/man/type_ridge.Rd +++ b/man/type_ridge.Rd @@ -58,7 +58,7 @@ the levels of the y-variable should be plotted.} \code{"nrd0"}, has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., \code{"SJ"} would rather fit, see also - Venables and Ripley (2002). + {\if{html}{\cite{}\out{}}Venables and Ripley (2002)\if{html}{\out{}}}. The specified (or computed) value of \code{bw} is multiplied by \code{adjust}. diff --git a/man/type_spline.Rd b/man/type_spline.Rd index 7055dcc0..a685a065 100644 --- a/man/type_spline.Rd +++ b/man/type_spline.Rd @@ -43,7 +43,7 @@ for default argument values. The inputs can contain missing values which are deleted, so at least one complete \code{(x, y)} pair is required. If \code{method = "fmm"}, the spline used is that of - Forsythe, Malcolm and Moler + {\if{html}{\cite{}\out{}}Forsythe, Malcolm, and Moler (1977)\if{html}{\out{}}} (an exact cubic is fitted through the four points at each end of the data, and this is used to determine the end conditions). Natural splines are used when \code{method = "natural"}, and periodic diff --git a/man/type_violin.Rd b/man/type_violin.Rd index d62dc292..da97b3e0 100644 --- a/man/type_violin.Rd +++ b/man/type_violin.Rd @@ -25,7 +25,7 @@ type_violin( \code{"nrd0"}, has remained the default for historical and compatibility reasons, rather than as a general recommendation, where e.g., \code{"SJ"} would rather fit, see also - Venables and Ripley (2002). + {\if{html}{\cite{}\out{}}Venables and Ripley (2002)\if{html}{\out{}}}. The specified (or computed) value of \code{bw} is multiplied by \code{adjust}. From c75c55596e2b8324bea9a159700ca21b8626bd42 Mon Sep 17 00:00:00 2001 From: Grant McDermott Date: Fri, 29 May 2026 18:13:06 -0700 Subject: [PATCH 13/13] news --- NEWS.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 3ab9d8c2..530f51a8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -26,7 +26,7 @@ visualizations. logic. Recall, these are themes like `"dynamic"`, `"clean"`, `"bw"`, etc. that automatically adjust margin spacing and related plot elements to reduce whitespace and improve the overall plot aesthetic. - (#549, #591 @grantmcdermott, @vincentarelbundock) + (#549, #591, #595 @grantmcdermott, @vincentarelbundock) - Plot margins now correctly respond to missing and/or multi-line `main`, `sub`, and `x`/`y` axis titles. For example, a plot without a `main` (or @@ -48,6 +48,14 @@ visualizations. directly (tick-to-label gap and label-to-title gap, respectively), replacing the guesswork of manually combining `mar`, `mgp`, and `tcl` values. (#590) + - The gap between y-axis tick labels and the y-axis title is now + constant regardless of label width (1-digit, 2-digit, decimals, etc.). + Previously the gap varied at the narrow/wide label boundary. (#596) + - New `gap.main` and `gap.sub` theme primitives control the spacing + between titles and the plot box. `gap.main` sets the gap from the main + title to whatever is below it (plot box or subtitle top); `gap.sub` + sets the gap from the subtitle to the plot box. Both default to `0.7`. + (#597) - **Theme refinements**. The `"tufte"` and `"void"` themes are now dynamic (responsive margins). The `"ipsum"` theme has been overhauled (bold title, no @@ -82,6 +90,9 @@ visualizations. providing finer control for spacing between ticks-labels and labels-titles, respectively, in dynamic themes. See the **Dynamic themes** entry above. (#590 @grantmcdermott) +- Similarly, `tinytheme()` also accepts `gap.main` and `gap.sub` primitives for + controlling the spacing between titles and the plot region. + (#595 @grantmcdermott) - New `tinyplot(..., cap = )` argument for adding a caption to your plots. Captions are drawn at the bottom of the plot and are best paired with dynamic themes (since separation from `sub` is guaranteed). Appearance is