diff --git a/.Rbuildignore b/.Rbuildignore index 4e5f513b..cb8d3441 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,6 +3,7 @@ ^\.Rproj\.user$ ^_EXAMPLES$ ^README\.Rmd$ +^README\.qmd$ ^README\.html$ ^_pkgdown\.yml$ ^docs$ diff --git a/DESCRIPTION b/DESCRIPTION index 5db0e5d0..8399c8ac 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: plot2 Type: Package Title: Lightweight extension of base R plot -Version: 0.0.3.9014 +Version: 0.0.3.9015 Authors@R: c( person( @@ -53,7 +53,7 @@ Suggests: Remotes: etiennebacher/altdoc Encoding: UTF-8 -RoxygenNote: 7.2.3.9000 +RoxygenNote: 7.3.0 URL: https://grantmcdermott.com/plot2/, http://grantmcdermott.com/plot2/ BugReports: https://github.com/grantmcdermott/plot2/issues diff --git a/NAMESPACE b/NAMESPACE index 22a4e3bd..3725af3a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,6 +3,8 @@ S3method(plot2,default) S3method(plot2,density) S3method(plot2,formula) +export(draw_legend) +export(par2) export(plot2) importFrom(grDevices,adjustcolor) importFrom(grDevices,extendrange) @@ -18,6 +20,7 @@ importFrom(graphics,arrows) importFrom(graphics,axis) importFrom(graphics,box) importFrom(graphics,grconvertX) +importFrom(graphics,grconvertY) importFrom(graphics,lines) importFrom(graphics,mtext) importFrom(graphics,par) diff --git a/NEWS.md b/NEWS.md index 1a396070..4c981b5b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # News -## 0.0.3.914 (development version) +## 0.0.3.915 (development version) Website: @@ -26,7 +26,13 @@ existing plot window. (#60 @grantmcdermott) - `plot2` gains a new `facet` argument for drawing faceted plots. Users can override the default square arrangement by passing the desired number of facet rows or columns to the companion `facet.args` helper function. Facets can be -combined with `by` grouping, or used on their own. (#83, #91 @grantmcdermott) +combined with `by` grouping, or used on their own. (#83, #91, #94 +@grantmcdermott) +- Users can now control `plot2`-specific graphical parameters globally via +the new `par2()` function (which is modeled on the base `par()` function). At +the moment only a subset of global parameters, mostly related to legend and +facet behaviour, are exposed in `par2`. But users can expect that more will be +added in future releases. (#33, #94 @grantmcdermott) Bug fixes: @@ -37,6 +43,17 @@ e.g. `plot2(rnorm(100)`. (#52 etiennebacher) - Interval plots like ribbons, errorbars, and pointranges are now correctly plotted even if a y variable isn't specified. (#54 @grantmcdermott) - Correctly label date-time axes. (#77 @grantmcdermott and @zeileis) +- Improved consistency of legend and facet margins across different plot types +and placement, via the new `lmar` and `fmar` arguments of `par2()`. The default +legend margin is `par2(lmar = c(1,0, 0.1)`, which means that there is 1.0 line +of padding between the legend and the plot region (inside margin) and 0.1 line +of padding between the legend and edge of the graphics device (outer margin). +Similarly, the default facet padding is `par2(fmar = c(1,1,1,1)`, which means +that there is a single line of padding around each side of the individual +facets. Users can override these defaults by passing numeric vectors of the +appropriate length to `par2()`. For example, `par2(lmar = c(0,0.1)` would shrink +the inner gap between the legend and plot region to zero, but leave the small +outer gap to outside of the graphics device unchanged. (#94 @grantmcdermott) ## 0.0.3 diff --git a/R/draw_legend.R b/R/draw_legend.R index dc75a9e7..4f06612d 100644 --- a/R/draw_legend.R +++ b/R/draw_legend.R @@ -14,7 +14,64 @@ #' @param col Plotting colour(s), passed down from `plot2`. #' @param bg Plotting character background fill colour(s), passed down from `plot2`. #' @param cex Plotting character expansion(s), passed down from `plot2`. -#' @param new_plot Should we be calling plot.new internally? +#' @param lmar Legend margins (in lines). Should be a numeric vector of the form +#' `c(inner, outer)`, where the first number represents the "inner" margin +#' between the legend and the plot, and the second number represents the +#' "outer" margin between the legend and edge of the graphics device. If no +#' explicit value is provided by the user, then reverts back to `par2("lmar")` +#' for which the default values are `c(1.0, 0.1)`. +#' @param has_sub Logical. Does the plot have a sub-caption. Only used if +#' keyword position is "bottom!", in which case we need to bump the legend +#' margin a bit further. +#' @param new_plot Should we be calling plot.new internally? +#' @examples +#' +#' oldmar = par("mar") +#' +#' draw_legend( +#' legend = "right!", ## default (other options incl, "left(!)", ""bottom(!)", etc.) +#' legend.args = list(title = "Key", bty = "o"), +#' lgnd_labs = c("foo", "bar"), +#' type = "p", +#' pch = 21:22, +#' col = 1:2 +#' ) +#' +#' # The legend is placed in the outer margin... +#' box("figure", col = "cyan", lty = 4) +#' # ... and the plot is proportionally adjusted against the edge of this +#' # margin. +#' box("plot") +#' # You can add regular plot objects per normal now +#' plot.window(xlim = c(1,10), ylim = c(1,10)) +#' points(1:10) +#' points(10:1, pch = 22, col = "red") +#' axis(1); axis(2) +#' # etc. +#' +#' # Important: A side effect of draw_legend is that the inner margins have been +#' # adjusted. (Here: The right margin, since we called "right!" above.) +#' par("mar") +#' +#' # To reset you should call `dev.off()` or just reset manually. +#' par(mar = oldmar) +#' +#' # Note that the inner and outer margin of the legend itself can be set via +#' # the `lmar` argument. (This can also be set globally via +#' # `par2(lmar = c(inner, outer))`.) +#' draw_legend( +#' legend.args = list(title = "Key", bty = "o"), +#' lgnd_labs = c("foo", "bar"), +#' type = "p", +#' pch = 21:22, +#' col = 1:2, +#' lmar = c(0, 0.1) ## set inner margin to zero +#' ) +#' box("figure", col = "cyan", lty = 4) +#' +#' par(mar = oldmar) +#' +#' @export draw_legend = function( legend = NULL, legend.args = NULL, @@ -26,10 +83,21 @@ draw_legend = function( col = NULL, bg = NULL, cex = NULL, + lmar = NULL, + has_sub = FALSE, new_plot = TRUE ) { - w = h = outer_right = outer_bottom = NULL + if (is.null(lmar)) { + lmar = par2("lmar") + } else { + if (!is.numeric(lmar) || length(lmar)!=2) stop ("lmar must be a numeric of length 2.") + } + + soma = outer_right = outer_bottom = NULL + + # + ## legend args ---- if (is.null(legend)) { legend.args[["x"]] = "right!" @@ -88,28 +156,59 @@ draw_legend = function( legend.args[["legend"]] = lgnd_labs } - # Catch to avoid recursive offsets, e.g., repeated plot2 calls with + # + ## legend placement ---- + + ooma = par("oma") + omar = par("mar") + topmar_epsilon = 0.1 + + # Catch to avoid recursive offsets, e.g. repeated plot2 calls with # "bottom!" legend position. + + ## restore inner margin defaults + ## (in case the plot region/margins were affected by the preceding plot2 call) + if (any(ooma != 0)) { + if ( ooma[1] != 0 & omar[1] == par("mgp")[1] + 1*par("cex.lab") ) omar[1] = 5.1 + if ( ooma[2] != 0 & omar[2] == par("mgp")[1] + 1*par("cex.lab") ) omar[2] = 4.1 + if ( ooma[3] == topmar_epsilon & omar[3] != 4.1 ) omar[3] = 4.1 + if ( ooma[4] != 0 & omar[4] == 0 ) omar[4] = 2.1 + par(mar = omar) + } + ## restore outer margin defaults par(omd = c(0,1,0,1)) + ooma = par("oma") + - ## Legend to outer side of plot + ## Legend to outer side (either right or left) of plot if (grepl("right!$|left!$", legend.args[["x"]])) { outer_right = grepl("right!$", legend.args[["x"]]) - # Margins of the plot (the first is the bottom margin) + ## Switch position anchor (we'll adjust relative to the _opposite_ side below) + if (outer_right) legend.args[["x"]] = gsub("right!$", "left", legend.args[["x"]]) + if (!outer_right) legend.args[["x"]] = gsub("left!$", "right", legend.args[["x"]]) + + ## We have to set the inner margins of the plot before the (fake) legend is + ## drawn, otherwise the inset calculation---which is based in the legend + ## width---will be off the first time. if (outer_right) { - par(mar=c(par("mar")[1:3], 0.1)) # remove right inner margin space - } else if (par("mar")[4]==0.1) { - par(mar=c(par("mar")[1:3], 2.1)) # revert right margin if outer left + # par(mar=c(par("mar")[1:3], 0)) ## Set rhs inner mar to zero + omar[4] = 0 ## TEST + } else { + # For outer left we have to account for the y-axis label too, which + # requires additional space + # par(mar=c( + # par("mar")[1], + # par("mgp")[1] + 1*par("cex.lab"), + # par("mar")[3:4] + # )) + omar[2] = par("mgp")[1] + 1*par("cex.lab") ## TEST } + par(mar = omar) ## TEST if (isTRUE(new_plot)) plot.new() - ## Switch position anchor (we'll adjust relative to the _opposite_ side below) - if (outer_right) legend.args[["x"]] = gsub("right!$", "left", legend.args[["x"]]) - if (!outer_right) legend.args[["x"]] = gsub("left!$", "right", legend.args[["x"]]) - legend.args[["horiz"]] = FALSE # "draw" fake legend @@ -119,33 +218,62 @@ draw_legend = function( keep.null = TRUE ) fklgnd = do.call("legend", fklgnd.args) - # calculate side margin width in ndc - w = grconvertX(fklgnd$rect$w, to="ndc") - grconvertX(0, to="ndc") - ## differing adjustments depending on side + + # calculate outer margin width in lines + soma = grconvertX(fklgnd$rect$w, to="lines") - grconvertX(0, to="lines") + # Add legend margins to the outer margin + soma = soma + sum(lmar) + # ooma = par("oma") ## TEST (comment) + ## differing outer margin adjustments depending on side if (outer_right) { - w = w*1.5 - par(omd = c(0, 1-w, 0, 1)) - legend.args[["inset"]] = c(1.025, 0) + ooma[4] = soma } else { - w = w + grconvertX(par("mgp")[1], from = "lines", to = "ndc") # extra space for y-axis title - par(omd = c(w, 1, 0, 1)) - legend.args[["inset"]] = c(1+w, 0) + ooma[2] = soma + } + par(oma = ooma) + + # determine legend inset + inset = grconvertX(lmar[1], from="lines", to="npc") - grconvertX(0, from = "lines", to = "npc") + if (isFALSE(outer_right)) { + # extra space needed for "left!" b/c of lhs inner margin + inset_bump = grconvertX(par("mar")[2], from = "lines", to = "npc") - grconvertX(0, from = "lines", to = "npc") + inset = inset + inset_bump } + # GM: The legend inset spacing only works _exactly_ if we refresh the plot + # area. I'm not sure why (and it works properly if we use the same + # parameters manually while debugging), but this hack seems to work. + par(new = TRUE) + plot.new() + par(new = FALSE) + # Finally, set the inset as part of the legend args. + legend.args[["inset"]] = c(1+inset, 0) ## Legend at the outer top or bottom of plot } else if (grepl("bottom!$|top!$", legend.args[["x"]])) { outer_bottom = grepl("bottom!$", legend.args[["x"]]) - # Catch to reset right margin if previous legend position was "right!" - if (par("mar")[4]== 0.1) par(mar=c(par("mar")[1:3], 2.1)) - - if (isTRUE(new_plot)) plot.new() - ## Switch position anchor (we'll adjust relative to the _opposite_ side below) if (outer_bottom) legend.args[["x"]] = gsub("bottom!$", "top", legend.args[["x"]]) if (!outer_bottom) legend.args[["x"]] = gsub("top!$", "bottom", legend.args[["x"]]) + ## We have to set the inner margins of the plot before the (fake) legend is + ## drawn, otherwise the inset calculation---which is based in the legend + ## width---will be off the first time. + if (outer_bottom) { + omar[1] = par("mgp")[1] + 1*par("cex.lab") ## TEST + if (isTRUE(has_sub)) omar[1] = omar[1] + 1*par("cex.sub") ## TEST + } else { + ## For "top!", the logic is slightly different: We don't expand the outer + ## margin b/c we need the legend to come underneath the main title. So + ## we rather expand the existing inner margin. + ooma[3] = ooma[3] + topmar_epsilon ## TESTING + par(oma = ooma) + } + par(mar = omar) + + if (isTRUE(new_plot)) plot.new() + legend.args[["horiz"]] = TRUE # Catch for horizontal ribbon legend spacing @@ -160,24 +288,45 @@ draw_legend = function( # "draw" fake legend fklgnd.args = utils::modifyList( legend.args, - list(x = 0, y = 0, plot = FALSE), + # list(x = 0, y = 0, plot = FALSE), + list(plot = FALSE), keep.null = TRUE ) fklgnd = do.call("legend", fklgnd.args) - # calculate bottom margin height in ndc - h = grconvertX(fklgnd$rect$h, to="ndc") - grconvertX(0, to="ndc") - ## differing adjustments depending on side + + # calculate outer margin width in lines + soma = grconvertY(fklgnd$rect$h, to="lines") - grconvertY(0, to="lines") + # Add legend margins to outer margin + soma = soma + sum(lmar) + ## differing outer margin adjustments depending on side if (outer_bottom) { - legend.args[["inset"]] = c(0, 1+2*h) - par(omd = c(0,1,0+h,1)) + ooma[1] = soma + } else { + omar[3] = omar[3] + soma - topmar_epsilon + par(mar = omar) + } + par(oma = ooma) + + # determine legend inset + inset = grconvertY(lmar[1], from="lines", to="npc") - grconvertY(0, from="lines", to="npc") + if (isTRUE(outer_bottom)) { + # extra space needed for "bottom!" b/c of lhs inner margin + inset_bump = grconvertY(par("mar")[1], from="lines", to="npc") - grconvertY(0, from="lines", to="npc") + inset = inset + inset_bump } else { - legend.args[["inset"]] = c(0, 1) - par(omd = c(0,1,0,1-h)) + epsilon_bump = grconvertY(topmar_epsilon, from="lines", to="npc") - grconvertY(0, from="lines", to="npc") + inset = inset + epsilon_bump } + # GM: The legend inset spacing only works _exactly_ if we refresh the plot + # area. I'm not sure why (and it works properly if we use the same + # parameters manually while debugging), but this hack seems to work. + par(new = TRUE) + plot.new() + par(new = FALSE) + # Finally, set the inset as part of the legend args. + legend.args[["inset"]] = c(0, 1+inset) } else { - # Catch to reset right margin if previous legend position was "right!" - if (par("mar")[4] == 0.1) par(mar=c(par("mar")[1:3], par("mar")[2]-2)) legend.args[["inset"]] = 0 if (isTRUE(new_plot)) plot.new() } diff --git a/R/par2.R b/R/par2.R index e01d3f49..376d6802 100644 --- a/R/par2.R +++ b/R/par2.R @@ -1,20 +1,58 @@ -par2 <- function(...) { +#' @title Set or query plot2 parameters +#' +#' @description `par2` can be used to set or query the additional set of +#' graphical parameters provided by `plot2` (i.e., beyond the base set +#' provided by \code{\link[graphics]{par}}). Similar to its base counterpart, parameters can be set +#' by passing the appropriate tag-value argument pairs to `par2`. Multiple +#' parameters can be set or queried at the same time, as a list. +#' +#' @md +#' @param ... arguments of the form `tag = value`. Supported `plot2` parameters +#' are described in the 'Graphical Parameters' section below. +#' +#' @section Graphical Parameters: +#' +#' \tabular{lll}{ +#' `fmar` \tab\tab 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)`, i.e. a single line of padding around each facet. If more that three facets are detected, the `fmar` parameter is scaled by 0.75 (i.e., three-quarters) to reduce the excess whitespace that would otherwise arise due to the absent axes lines and labels. (An exception is made for 2x2 plots to better match the `cex` expansion logic of the base graphics system under this particular layout.) Similarly, note that an extra 0.5 lines is subtracted from each side of the facet padding for plots that aren't framed, to reduce excess whitespace.\cr +#' \tab\tab\cr +#' \tab\tab\cr +#' `last_facet_par` \tab\tab Full list of graphical parameters used to constructed the most recent faceted `plot2` plot during the current session. Unlike other `par2` parameters, this parameter is intended for internal use (specifically, to enable adding further elements on top of an existing faceted plot) and should _not_ be set by the user.\cr +#' \tab\tab\cr +#' \tab\tab\cr +#' `lmar` \tab\tab A numeric vector of form `c(inner, outer)` that gives the margin padding, in terms of lines, around the automatic `plot2` legend. Defaults to `c(1.0, 0.1)`, where the first number represents the "inner" margin between the legend and the plot region, and the second number represents the "outer" margin between the legend and edge of the graphics device. (Note that an exception for the definition of the "outer" legend margin occurs when the legend placement is `"top!"`, since the legend is placed above the plot region but below the main title. In such cases, the outer margin is relative to the existing gap between the title and the plot region, which is itself determined by `par("mar")[3]`.)\cr +#' } +#' +#' @export +par2 = function(...) { - opts <- list(...) - par2_old <- as.list(.par2) - nam <- names(opts) + opts = list(...) + par2_old = as.list(.par2) + nam = names(opts) - if(length(opts$grid)) { - grid <- as.logical(opts$grid) - if(!is.logical(grid)) stop("grid needs to be logical") - .par2$grid <- grid + if (length(opts$fmar)) { + fmar = as.numeric(opts$fmar) + if(!is.numeric(fmar)) stop("fmar needs to be numeric") + if(length(fmar)!=4) stop("fmar needs to be of length 4, i.e. c(b,l,t,r)") + .par2$fmar = fmar } - if(length(opts$last_facet_par)) { - # last_facet_par <- as.list(opts$last_facet_par) - last_facet_par <- opts$last_facet_par + # if (length(opts$grid)) { + # grid = as.logical(opts$grid) + # if(!is.logical(grid)) stop("grid needs to be logical") + # .par2$grid = grid + # } + + if (length(opts$last_facet_par)) { + last_facet_par = opts$last_facet_par if(!(is.null(last_facet_par) || is.list(last_facet_par))) stop("last_facet_par needs to be NULL or a list") - .par2$last_facet_par <- last_facet_par + .par2$last_facet_par = last_facet_par + } + + if (length(opts$lmar)) { + lmar = as.numeric(opts$lmar) + if(!is.numeric(lmar)) stop("lmar needs to be numeric") + if(length(lmar)!=2) stop("lmar needs to be of length 2, i.e. c(inner, outer)") + .par2$lmar = lmar } ## Like par(), we want the return object to be dependent on inputs... @@ -24,7 +62,9 @@ par2 <- function(...) { if (is.null(nam)) { if (!is.null(opts) && length(opts)!=0) { # specific values requested - return(`names<-`(lapply(opts, function(x) .par2[[x]]), opts)) + ret = (`names<-`(lapply(opts, function(x) .par2[[x]]), opts)) + if (length(ret)==1) ret = ret[[1]] + return(ret) } else { # no specific request; return all existing values invisibly return(invisible(par2_old)) diff --git a/R/plot2.R b/R/plot2.R index 15b2dadb..15bc33b9 100644 --- a/R/plot2.R +++ b/R/plot2.R @@ -25,9 +25,19 @@ #' with `interaction(facet_var1, facet_var2)`. Also accepts the special "by" #' convenience keyword, in which case facets will match the grouping #' variable(s) above. -#' @param facet.args a list of arguments for controlling faceting behaviour. -#' Currently only `nrow` and `ncol` are supported, with the former superseding -#' the latter. Ignored if `facet` is NULL. +#' @param facet.args an optional list of arguments for controlling faceting +#' behaviour. (Ignored if `facet` is NULL.) Currently only the following are +#' supported: +#' - `nrow`, `ncol` for overriding the default "square" facet window +#' arrangement. Only one of these should be specified; if not then the former +#' will supersede the latter. +#' - `fmar` a vector of form `c(b,l,t,r)` for controlling the base margin +#' between facets in terms of lines. Defaults to the value of `par2("fmar")`, +#' which should be `c(1,1,1,1)`, i.e. a single line of padding around each +#' individual facet, assuming it hasn't been overridden by the user as part +#' their global `par2` settings. Note some automatic adjustments are made for +#' certain layouts, and depending on whether the plot is framed or not, to +#' reduce excess whitespace. See \code{\link[plot2]{par2}} for more details. #' @param formula a `formula` that optionally includes grouping variable(s) #' after a vertical bar, e.g. `y ~ x | z`. One-sided formulae are also #' permitted, e.g. `~ y | z`. Note that the `formula` and `x` arguments @@ -162,7 +172,7 @@ #' section of `plot`). #' #' @importFrom grDevices adjustcolor extendrange palette palette.colors palette.pals hcl.colors hcl.pals xy.coords -#' @importFrom graphics abline arrows axis Axis box grconvertX lines par plot.default plot.new plot.window points polygon segments title mtext +#' @importFrom graphics abline arrows axis Axis box grconvertX grconvertY lines par plot.default plot.new plot.window points polygon segments title mtext #' @importFrom utils modifyList tail #' #' @examples @@ -354,6 +364,15 @@ plot2.default = function( # main = sub = xlab = ylab = NULL ## Rather do this later } + # Save current graphical parameters + opar = par(no.readonly = TRUE) + if (par_restore || !is.null(facet)) { + on.exit(par(opar), add = TRUE) + } + + # catch for adding to existing facet plot + if (!is.null(facet) && isTRUE(add)) par(par2("last_facet_par")) + # Capture deparsed expressions early, before x, y and by are evaluated x_dep = deparse1(substitute(x)) y_dep = if (is.null(y)) { @@ -501,12 +520,6 @@ plot2.default = function( } } - # Save current graphical parameters - opar = par(no.readonly = TRUE) - - # catch for adding to existing facet plot - if (!is.null(facet) && isTRUE(add)) par(par2("last_facet_par")[[1]]) - # Determine the number and arrangement of facets. # Note: We're do this up front, so we can make some adjustments to legend cex # next (if there are facets). But the actual drawing of the facets will only @@ -551,20 +564,19 @@ plot2.default = function( # legend cex adjustment for facet plots # see: https://stat.ethz.ch/pipermail/r-help/2017-August/448431.html if (nfacet_rows >= 3 || nfacet_cols >= 3) { - cex_lgnd_adj = 0.66 + cex_fct_adj = 0.66 } else if (nfacet_rows == 2 && nfacet_cols == 2) { - cex_lgnd_adj = 0.83 + cex_fct_adj = 0.83 } else { - cex_lgnd_adj = 1 + cex_fct_adj = 1 } } else { # no facet case - facets = ifacet = nfacets = oxaxis = oyaxis = cex_lgnd_adj = 1 + facets = ifacet = nfacets = oxaxis = oyaxis = cex_fct_adj = 1 } - # ## Global plot elements (legend and titles) # @@ -599,6 +611,8 @@ plot2.default = function( lgnd_labs = ylab } + has_sub = !is.null(sub) + draw_legend( legend = legend, legend.args = legend.args, @@ -609,13 +623,39 @@ plot2.default = function( lty = lty, col = col, bg = bg, - cex = cex * cex_lgnd_adj + cex = cex * cex_fct_adj, + has_sub = has_sub ) has_legend = TRUE } else if (legend.args[["x"]]=="none" && isFALSE(add)) { + omar = par("mar") + ooma = par("oma") + topmar_epsilon = 0.1 + + # Catch to avoid recursive offsets, e.g. repeated plot2 calls with + # "bottom!" legend position. + + ## restore inner margin defaults + ## (in case the plot region/margins were affected by the preceding plot2 call) + if (any(ooma != 0)) { + if ( ooma[1] != 0 & omar[1] == par("mgp")[1] + 1*par("cex.lab") ) omar[1] = 5.1 + if ( ooma[2] != 0 & omar[2] == par("mgp")[1] + 1*par("cex.lab") ) omar[2] = 4.1 + if ( ooma[3] == topmar_epsilon & omar[3] != 4.1 ) omar[3] = 4.1 + if ( ooma[4] != 0 & omar[4] == 0 ) omar[4] = 2.1 + par(mar = omar) + } + ## restore outer margin defaults (with a catch for custom mfrow plots) + if (all(par("mfrow") == c(1, 1))) { + par(omd = c(0,1,0,1)) + } + + # clean up for now + rm(omar, ooma, topmar_epsilon) + + # Draw new plot plot.new() } @@ -625,15 +665,27 @@ plot2.default = function( # main title # Note that we include a special catch for the main title if legend is # "top!" (and main is specified in the first place). - adj_title = !is.null(legend) && (legend == "top!" || (!is.null(legend.args[["x"]]) && legend.args[["x"]]=="top!")) + legend_eval = tryCatch(eval(legend), error = function(e) NULL) + # Extra bit of footwork if user passed legend = legend(...) instead of + # legend = list(...), since the call environment is tricky + if (is.null(legend_eval)) { + legend_eval = tryCatch(paste0(legend)[[2]], error = function(e) NULL) + } + adj_title = !is.null(legend) && (legend == "top!" || (!is.null(legend.args[["x"]]) && legend.args[["x"]]=="top!") || (is.list(legend_eval) && legend_eval[[1]]=="top!") ) if (is.null(main) || isFALSE(adj_title)) { title( main = main, sub = sub ) } else { - # Bump main up to make space for the legend beneath it - title(main = main, line = 5, xpd = NA) + # For the "top!" legend case, bump main title up to make space for the + # legend beneath it: Take the normal main title line gap (i.e., 1.7 lines) + # and add the difference between original top margin and new one (i.e., + # which should equal the height of the new legend). Note that we also + # include a 0.1 epsilon bump, which we're using to reset the plot2 + # window in case of recursive "top!" calls. (See draw_legend code.) + title(main = main, line = par("mar")[3] - opar[["mar"]][3] + 1.7 + 0.1) + title(sub = sub) } # Axis titles title(xlab = xlab, ylab = ylab) @@ -647,45 +699,14 @@ plot2.default = function( if (!is.null(facet) && isFALSE(add)) { - # Arrange facets based on the calculations we did earlier - par(mfrow = c(nfacet_rows, nfacet_cols)) - - # Also adjust spacing between facets to avoid excess whitespace + if (is.null(omar)) omar = par("mar") - # Side note: Rather use original mar in case of already-reduced space (due - # to "right!" legend correction above) - if (is.null(omar)) omar = opar[["mar"]] - - # Bump extra space for titles if present - ooma = par("oma") - if (!is.null(xlab)) ooma[1] = ooma[1] + 3 - if (!is.null(ylab)) ooma[2] = ooma[2] + 3 - # Bump top margin down so facet titles don't overlap with main title space - ooma[3] = ooma[3] + 2.1 - # Adjustment if inheriting tight RHS margin - # if (isTRUE(frame.plot) && ooma[4]==0.1) ooma[4] = ooma[4] + 2 - if (omar[4]==0.1) ooma[4] = ooma[4] + 2 - # extra bump b/c also need to a/c for facet titles - if (!is.null(main)) { - if (nfacets >= 3) { - ## exception for 2x2 case - if (nfacet_rows == 2 && nfacet_cols == 2) { - ooma[3] = ooma[3] + 0 - } else { - ooma[3] = ooma[3] + 2 - } - } - } - # apply the changes - par(oma = ooma) - - # Need extra adjustment to top margin if facet titles have "\n" newline separator + # Need extra adjustment to top margin if facet titles have "\n" newline + # separator. (Note that we'll also need to take account for this in the + # individual facet margins / gaps further below.) facet_newlines = lengths(gregexpr("\n", grep("\\n", facets, value = TRUE))) if (length(facet_newlines)==0) facet_newlines = 0 - # # Side note: Rather use original mar in case of already-reduced space (due - # # to "right!" legend correction above) - # if (is.null(omar)) omar = opar[["mar"]] - omar[3] = omar[3] + 1.5*max(facet_newlines) + omar[3] = omar[3] + max(facet_newlines) # apply the changes par(mar = omar) @@ -697,33 +718,68 @@ plot2.default = function( if (isFALSE(add)) { if (nfacets > 1) { - # Reduce the margins between the individual facets, to avoid excess - # whitespace. - # Note: Rather use original in case of already-reduced space (due to - # "right!" legend correction above.) - if (is.null(omar)) omar = opar[["mar"]] - omar[c(1,2)] = omar[c(1,2)] - 2 - if (!is.null(main)) omar[3] = omar[3] - 2 - # extra reductions if plot isn't framed + # Set facet margins (i.e., gaps between facets) + if (is.null(facet.args[["fmar"]])) { + fmar = par2("fmar") + } else { + if (length(facet.args[["fmar"]]) != 4) { + warning( + "`fmar` has to be a vector of length four, e.g.", + "`facet.args = list(fmar = c(b,l,t,r))`.", + "\n", + "Resetting to fmar = c(1,1,1,1) default.", + "\n" + ) + fmar = par2("fmar") + } else { + fmar = facet.args[["fmar"]] + } + } + # We need to adjust for n>=3 facet cases for correct spacing... + if (nfacets >= 3) { + ## ... exception for 2x2 cases + if (!(nfacet_rows==2 && nfacet_cols==2)) fmar = fmar*.75 + } + # Extra reduction if no plot frame to reduce whitespace if (isFALSE(frame.plot)) { - # Tricksy, but simultaneously adjust outer and inner margins (in - # different directions) to preserve figure centroids - ooma = par("oma") - ooma[c(1,2,3)] = ooma[c(1,2,3)] + 1 - par(oma = ooma) - omar[c(1,2,3)] = omar[c(1,2,3)] - 1 - if (has_legend) omar[4] = 0.1 # no space to RHS if legend present - } else if (has_legend) { - ## Avoid double correction in case of RHS legend - ooma = par("oma") - ooma[4] = max(0, ooma[4] - 2) - par(oma = ooma) + fmar = fmar - 0.5 } - par(mar = omar) + + ooma = par("oma") + + # Bump top margin down for facet titles + fmar[3] = fmar[3] + 1 + # Need extra adjustment to top margin if facet titles have "\n" newline separator + facet_newlines = lengths(gregexpr("\n", grep("\\n", facets, value = TRUE))) + if (length(facet_newlines)==0) facet_newlines = 0 + fmar[3] = fmar[3] + max(facet_newlines) + + omar = par("mar") + + # Now we set the margins. The trick here is that we simultaneously adjust + # inner (mar) and outer (oma) margins by the same amount, but in opposite + # directions, to preserve the overall facet and plot centroids. + nmar = (fmar+.1)/cex_fct_adj + noma = (ooma+omar-fmar-.1)/cex_fct_adj + # Catch in case of negative oma values. (Probably only occurs with some + # user-supplied par2(lmar) values and a "left!" positioned legend.) + if (any(noma<0)) { + noma_orig = noma + noma[noma<0] = 0 + # noma_diff = noma-noma_orig + # nmar = nmar + noma_diff + } + # apply changes + par(oma = noma) + par(mar = nmar) + + # Now that the margins have been set, arrange facet rows and columns based + # on our earlier calculations. + par(mfrow = c(nfacet_rows, nfacet_cols)) } for (ii in ifacet) { - + # See: https://github.com/grantmcdermott/plot2/issues/65 if (nfacets > 1) { mfgi = ceiling(ii/nfacet_cols) @@ -802,7 +858,7 @@ plot2.default = function( # facet titles if (!is.null(facet)) { - mtext(paste(facets[[ii]]), side = 3) + mtext(paste(facets[[ii]]), side = 3, line = 0.1) } } # end of ii facet loop @@ -931,11 +987,6 @@ plot2.default = function( par2(last_facet_par = par(no.readonly = TRUE)) } - - if (par_restore || !is.null(facet)) { - on.exit(par(opar), add = TRUE) - } - } diff --git a/R/zzz.R b/R/zzz.R index f2bb2d28..fe8d312e 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -6,9 +6,16 @@ assign(".plot2_env", new.env(), envir = plt2ptns) .par2 <- new.env() - .par2$grid <- if(is.null(getOption("plot2_grid"))) FALSE else as.logical(getOption("plot2_grid")) + # Facet margin, i.e. gap between the individual facet windows + .par2$fmar <- if(is.null(getOption("plot2_fmar"))) c(1,1,1,1) else as.numeric(getOption("plot2_fmar")) + + # .par2$grid <- if(is.null(getOption("plot2_grid"))) FALSE else as.logical(getOption("plot2_grid")) + .par2$last_facet_par <- if(is.null(getOption("plot2_last_facet_par"))) NULL else getOption("plot2_last_facet_par") + # Legend margin, i.e. gap between the legend and the plot elements + .par2$lmar <- if(is.null(getOption("plot2_lmar"))) c(1.0, 0.1) else as.numeric(getOption("plot2_lmar")) + assign(".par2", .par2, envir = plt2ptns) } \ No newline at end of file diff --git a/README.md b/README.md index 0fac6003..511822a1 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermo [![Docs](https://img.shields.io/badge/docs-homepage-blue.svg)](https://grantmcdermott.com/plot2/index.html) -A lightweight extension of the base R `plot` system, with support for -automatic grouping and legend handling, and various other enhancements. +A lightweight extension of the base R graphics system, with support for +automatic grouping, legends, facets and various other enhancements. ## Installation @@ -22,9 +22,9 @@ automatic grouping and legend handling, and various other enhancements. install.packages("plot2", repos = "https://grantmcdermott.r-universe.dev") ``` -Our goal is to submit to CRAN towards the end of 2023, once we have -settled on some remaining design choices and features support. You can -take a look at the [open +Our goal is to submit to CRAN within the few months of 2024, once we +have settled on some remaining design choices and features support. You +can take a look at the [open issues](https://github.com/grantmcdermott/plot2/issues) to see what’s currently under consideration. Please feel free to weigh on these if you have opinions. We want end users to have a say in determining the final diff --git a/README.qmd b/README.qmd index 1a9395aa..439327ba 100644 --- a/README.qmd +++ b/README.qmd @@ -26,8 +26,8 @@ knitr::opts_chunk$set( [![Docs](https://img.shields.io/badge/docs-homepage-blue.svg)](https://grantmcdermott.com/plot2/index.html) -A lightweight extension of the base R `plot` system, with support for -automatic grouping and legend handling, and various other enhancements. +A lightweight extension of the base R graphics system, with support for +automatic grouping, legends, facets and various other enhancements. ## Installation @@ -37,7 +37,7 @@ automatic grouping and legend handling, and various other enhancements. install.packages("plot2", repos = "https://grantmcdermott.r-universe.dev") ``` -Our goal is to submit to CRAN towards the end of 2023, once we have +Our goal is to submit to CRAN within the few months of 2024, once we have settled on some remaining design choices and features support. You can take a look at the [open issues](https://github.com/grantmcdermott/plot2/issues) to see what's currently under consideration. Please feel free to weigh on these if you diff --git a/inst/tinytest/_tinysnapshot/addTRUE.svg b/inst/tinytest/_tinysnapshot/addTRUE.svg index c912cc91..fe362669 100644 --- a/inst/tinytest/_tinysnapshot/addTRUE.svg +++ b/inst/tinytest/_tinysnapshot/addTRUE.svg @@ -21,43 +21,36 @@ - - - - - - -cyl -4 -6 -8 + + + + + + +cyl +4 +6 +8 - - + + - -wt + +wt fit - - - - - - - - - - - - -2 -3 -4 -5 + + + + + +2 +3 +4 +5 @@ -69,59 +62,64 @@ 20 25 30 - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_by.svg b/inst/tinytest/_tinysnapshot/aesthetics_by.svg index 4b1a60a5..5011c6d2 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_by.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_by.svg @@ -21,39 +21,50 @@ - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -63,350 +74,365 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_by_nocol.svg b/inst/tinytest/_tinysnapshot/aesthetics_by_nocol.svg index 216585c9..a53342f0 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_by_nocol.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_by_nocol.svg @@ -21,39 +21,50 @@ - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -63,350 +74,365 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_by_par.svg b/inst/tinytest/_tinysnapshot/aesthetics_by_par.svg index 9506fb23..9aa83f8f 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_by_par.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_by_par.svg @@ -21,37 +21,48 @@ - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -61,288 +72,303 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_by_recycle.svg b/inst/tinytest/_tinysnapshot/aesthetics_by_recycle.svg index 291e6c48..5cdaae12 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_by_recycle.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_by_recycle.svg @@ -21,38 +21,49 @@ - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -62,318 +73,333 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_by_type_l.svg b/inst/tinytest/_tinysnapshot/aesthetics_by_type_l.svg index 89ae201a..eea2834d 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_by_type_l.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_by_type_l.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_type_b.svg b/inst/tinytest/_tinysnapshot/aesthetics_type_b.svg index d1bd77fa..3da0dc39 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_type_b.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_type_b.svg @@ -21,37 +21,48 @@ - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -61,288 +72,303 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_type_b_col_pch.svg b/inst/tinytest/_tinysnapshot/aesthetics_type_b_col_pch.svg index 31b62a52..fcd95523 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_type_b_col_pch.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_type_b_col_pch.svg @@ -21,39 +21,50 @@ - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -63,350 +74,365 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_type_b_lty.svg b/inst/tinytest/_tinysnapshot/aesthetics_type_b_lty.svg index 3ae6ec9c..e300a2c5 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_type_b_lty.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_type_b_lty.svg @@ -21,37 +21,48 @@ - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -61,288 +72,303 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/aesthetics_type_l.svg b/inst/tinytest/_tinysnapshot/aesthetics_type_l.svg index 7d3ae2af..1e2b53c1 100644 --- a/inst/tinytest/_tinysnapshot/aesthetics_type_l.svg +++ b/inst/tinytest/_tinysnapshot/aesthetics_type_l.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/arg_log_x.svg b/inst/tinytest/_tinysnapshot/arg_log_x.svg index f82f8584..f94ff0c2 100644 --- a/inst/tinytest/_tinysnapshot/arg_log_x.svg +++ b/inst/tinytest/_tinysnapshot/arg_log_x.svg @@ -221,6 +221,15 @@ + + + + + + +Day +Temp + @@ -399,13 +408,4 @@ - - - - - - -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/arg_log_xy.svg b/inst/tinytest/_tinysnapshot/arg_log_xy.svg index 7bf733c5..d2bf6227 100644 --- a/inst/tinytest/_tinysnapshot/arg_log_xy.svg +++ b/inst/tinytest/_tinysnapshot/arg_log_xy.svg @@ -221,6 +221,15 @@ + + + + + + +Day +Temp + @@ -399,13 +408,4 @@ - - - - - - -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/arg_log_y.svg b/inst/tinytest/_tinysnapshot/arg_log_y.svg index 5da9192f..1d256cda 100644 --- a/inst/tinytest/_tinysnapshot/arg_log_y.svg +++ b/inst/tinytest/_tinysnapshot/arg_log_y.svg @@ -225,6 +225,15 @@ + + + + + + +Day +Temp + @@ -407,13 +416,4 @@ - - - - - - -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/arg_log_yx.svg b/inst/tinytest/_tinysnapshot/arg_log_yx.svg index 7bf733c5..d2bf6227 100644 --- a/inst/tinytest/_tinysnapshot/arg_log_yx.svg +++ b/inst/tinytest/_tinysnapshot/arg_log_yx.svg @@ -221,6 +221,15 @@ + + + + + + +Day +Temp + @@ -399,13 +408,4 @@ - - - - - - -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/date.svg b/inst/tinytest/_tinysnapshot/date.svg index eac62584..288e3d35 100644 --- a/inst/tinytest/_tinysnapshot/date.svg +++ b/inst/tinytest/_tinysnapshot/date.svg @@ -21,6 +21,8 @@ +x_dt +y @@ -57,17 +59,13 @@ + - - -x_dt -y - - + diff --git a/inst/tinytest/_tinysnapshot/date_time.svg b/inst/tinytest/_tinysnapshot/date_time.svg index 5592eb6a..89a3df1f 100644 --- a/inst/tinytest/_tinysnapshot/date_time.svg +++ b/inst/tinytest/_tinysnapshot/date_time.svg @@ -21,6 +21,8 @@ +x_dtt +y @@ -58,17 +60,13 @@ + - - -x_dtt -y - - + diff --git a/inst/tinytest/_tinysnapshot/density_factor.svg b/inst/tinytest/_tinysnapshot/density_factor.svg index d2ade374..4c65bf35 100644 --- a/inst/tinytest/_tinysnapshot/density_factor.svg +++ b/inst/tinytest/_tinysnapshot/density_factor.svg @@ -21,28 +21,40 @@ - - - -Species -setosa -versicolor -virginica - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 + + + +Species +setosa +versicolor +virginica + + + + + + + +density.default(x = Sepal.Width) +N = [50, 50, 50] Joint Bandwidth = 0.1301 +Density + + + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 @@ -58,26 +70,16 @@ 0.8 1.0 1.2 - - - - - - - - -density.default(x = Sepal.Width) -N = [50, 50, 50] Joint Bandwidth = 0.1301 -Density + - - + + - - - - + + + + diff --git a/inst/tinytest/_tinysnapshot/density_fill.svg b/inst/tinytest/_tinysnapshot/density_fill.svg index c1f39dfe..be74d1d9 100644 --- a/inst/tinytest/_tinysnapshot/density_fill.svg +++ b/inst/tinytest/_tinysnapshot/density_fill.svg @@ -21,47 +21,40 @@ - - - -Species -setosa -versicolor -virginica + + + +Species +setosa +versicolor +virginica - - + + - -density.default(x = Sepal.Width) -N = [50, 50, 50] Joint Bandwidth = 0.1301 + +density.default(x = Sepal.Width) +N = [50, 50, 50] Joint Bandwidth = 0.1301 Density - - - - - - - - - - - - - - - -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 @@ -77,14 +70,19 @@ 0.8 1.0 1.2 - + - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/density_nogroups.svg b/inst/tinytest/_tinysnapshot/density_nogroups.svg index ce10624d..54f65b9a 100644 --- a/inst/tinytest/_tinysnapshot/density_nogroups.svg +++ b/inst/tinytest/_tinysnapshot/density_nogroups.svg @@ -21,6 +21,9 @@ +density.default(x = mpg) +N = 32 Bandwidth = 2.477 +Density @@ -48,9 +51,6 @@ 0.06 0.07 -density.default(x = mpg) -N = 32 Bandwidth = 2.477 -Density diff --git a/inst/tinytest/_tinysnapshot/density_numeric.svg b/inst/tinytest/_tinysnapshot/density_numeric.svg index 746ed6f7..356279ad 100644 --- a/inst/tinytest/_tinysnapshot/density_numeric.svg +++ b/inst/tinytest/_tinysnapshot/density_numeric.svg @@ -21,20 +21,32 @@ - - -am -0 -1 - - - - - -10 -20 -30 -40 + + +am +0 +1 + + + + + + + +density.default(x = mpg) +N = [19, 13] Joint Bandwidth = 2.453 +Density + + + + + + + +10 +20 +30 +40 @@ -46,25 +58,15 @@ 0.04 0.06 0.08 - - - - - - - - -density.default(x = mpg) -N = [19, 13] Joint Bandwidth = 2.453 -Density + - - + + - - - + + + diff --git a/inst/tinytest/_tinysnapshot/density_type_factor.svg b/inst/tinytest/_tinysnapshot/density_type_factor.svg index 9c2165a3..89559990 100644 --- a/inst/tinytest/_tinysnapshot/density_type_factor.svg +++ b/inst/tinytest/_tinysnapshot/density_type_factor.svg @@ -21,28 +21,39 @@ - - - -Species -setosa -versicolor -virginica - - - - - - - - -1.5 -2.0 -2.5 -3.0 -3.5 -4.0 -4.5 + + + +Species +setosa +versicolor +virginica + + + + + + + +N = [50, 50, 50] Joint Bandwidth = 0.1301 +Density + + + + + + + + + + +1.5 +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 @@ -58,25 +69,16 @@ 0.8 1.0 1.2 - - - - - - - - -N = [50, 50, 50] Joint Bandwidth = 0.1301 -Density + - - + + - - - - + + + + diff --git a/inst/tinytest/_tinysnapshot/density_type_fill.svg b/inst/tinytest/_tinysnapshot/density_type_fill.svg index f00bc1b1..f2e2ad5e 100644 --- a/inst/tinytest/_tinysnapshot/density_type_fill.svg +++ b/inst/tinytest/_tinysnapshot/density_type_fill.svg @@ -21,46 +21,39 @@ - - - -Species -setosa -versicolor -virginica + + + +Species +setosa +versicolor +virginica - - + + - -N = [50, 50, 50] Joint Bandwidth = 0.1301 + +N = [50, 50, 50] Joint Bandwidth = 0.1301 Density - - - - - - - - - - - - - - - -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 @@ -76,14 +69,19 @@ 0.8 1.0 1.2 - + - - - - - - - + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/density_type_nogroups.svg b/inst/tinytest/_tinysnapshot/density_type_nogroups.svg index f511b451..15d7a0ae 100644 --- a/inst/tinytest/_tinysnapshot/density_type_nogroups.svg +++ b/inst/tinytest/_tinysnapshot/density_type_nogroups.svg @@ -21,6 +21,8 @@ +N = 32 Bandwidth = 2.477 +Density @@ -48,8 +50,6 @@ 0.06 0.07 -N = 32 Bandwidth = 2.477 -Density diff --git a/inst/tinytest/_tinysnapshot/density_type_numeric.svg b/inst/tinytest/_tinysnapshot/density_type_numeric.svg index c4c00cf1..0551cbd9 100644 --- a/inst/tinytest/_tinysnapshot/density_type_numeric.svg +++ b/inst/tinytest/_tinysnapshot/density_type_numeric.svg @@ -21,20 +21,31 @@ - - -am -0 -1 - - - - - -10 -20 -30 -40 + + +am +0 +1 + + + + + + + +N = [19, 13] Joint Bandwidth = 2.453 +Density + + + + + + + +10 +20 +30 +40 @@ -46,24 +57,15 @@ 0.04 0.06 0.08 - - - - - - - - -N = [19, 13] Joint Bandwidth = 2.453 -Density + - - + + - - - + + + diff --git a/inst/tinytest/_tinysnapshot/facet.svg b/inst/tinytest/_tinysnapshot/facet.svg index 7f385676..e99b7f32 100644 --- a/inst/tinytest/_tinysnapshot/facet.svg +++ b/inst/tinytest/_tinysnapshot/facet.svg @@ -25,141 +25,141 @@ mpg - - + + - + - - - - - -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 - -4 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 - - + + - + - - - - - -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/facet_1x2.svg b/inst/tinytest/_tinysnapshot/facet_1x2.svg new file mode 100644 index 00000000..65933864 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_1x2.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + +wt +mpg + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_2x1.svg b/inst/tinytest/_tinysnapshot/facet_2x1.svg new file mode 100644 index 00000000..d5f83d2a --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_2x1.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + +wt +mpg + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_2x2.svg b/inst/tinytest/_tinysnapshot/facet_2x2.svg new file mode 100644 index 00000000..85a6242a --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_2x2.svg @@ -0,0 +1,198 @@ + + + + + + + + + + + + +wt +mpg + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +1.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +1.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +0.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_args_ncol.svg b/inst/tinytest/_tinysnapshot/facet_args_ncol.svg index 726296b2..2d2fb4b3 100644 --- a/inst/tinytest/_tinysnapshot/facet_args_ncol.svg +++ b/inst/tinytest/_tinysnapshot/facet_args_ncol.svg @@ -26,240 +26,240 @@ mpg - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.1 - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_by.svg b/inst/tinytest/_tinysnapshot/facet_by.svg index dc51515d..b4eaabb6 100644 --- a/inst/tinytest/_tinysnapshot/facet_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_by.svg @@ -21,163 +21,163 @@ - - -am -0 -1 + + +am +0 +1 - - + + - -wt + +wt mpg - - + + - + - - - - - -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 - -4 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 - - + + - + - - - - - -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/facet_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_by_equal.svg index 257e0631..b4d40ca7 100644 --- a/inst/tinytest/_tinysnapshot/facet_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_by_equal.svg @@ -21,171 +21,171 @@ - - - -cyl -4 -6 -8 + + + +cyl +4 +6 +8 - - + + - -wt + +wt mpg - - + + - + - - - - - -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 - -4 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 - - + + - + - - - - - -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/facet_density.svg b/inst/tinytest/_tinysnapshot/facet_density.svg index 4fb3b722..78defdce 100644 --- a/inst/tinytest/_tinysnapshot/facet_density.svg +++ b/inst/tinytest/_tinysnapshot/facet_density.svg @@ -25,124 +25,131 @@ Density - - + + - + - - - - - - - - -5 -10 -15 -20 -25 -30 -35 - - - - - -0.00 -0.05 -0.10 -0.15 - -4 + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +4 - - + + - + - - - - - - - - -5 -10 -15 -20 -25 -30 -35 - - - - - -0.00 -0.05 -0.10 -0.15 - -6 + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +6 - - + + - + - - - - - - - - -5 -10 -15 -20 -25 -30 -35 - - - - - -0.00 -0.05 -0.10 -0.15 - -8 + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +8 - - + + - - + + - - + + - - + + - + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_density_by.svg b/inst/tinytest/_tinysnapshot/facet_density_by.svg index e35ce44b..98ec4043 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_by.svg @@ -21,134 +21,150 @@ - - -am -0 -1 + + +am +0 +1 - - + + - -N = [3, 8, 4, ...] Joint Bandwidth = 0.9703 + +N = [3, 8, 4, ...] Joint Bandwidth = 0.9703 Density - - + + - + - - - - - - - -10 -20 -30 - - - - - -0.0 -0.1 -0.2 -0.3 - -4 + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + +0.0 +0.1 +0.2 +0.3 + +4 - - + + - + - - - - - - - -10 -20 -30 - - - - - -0.0 -0.1 -0.2 -0.3 - -6 + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + +0.0 +0.1 +0.2 +0.3 + +6 - - + + - + - - - - - - - -10 -20 -30 - - - - - -0.0 -0.1 -0.2 -0.3 - -8 - - - - - - - - - - - - - - - - - - + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + +0.0 +0.1 +0.2 +0.3 + +8 + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg index 1b4ece50..2544d4cb 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_by_equal.svg @@ -21,145 +21,161 @@ - - - -cyl -4 -6 -8 + + + +cyl +4 +6 +8 - - + + - -N = [11, 7, 14] Joint Bandwidth = 1.377 + +N = [11, 7, 14] Joint Bandwidth = 1.377 Density - - + + - + - - - - - - - - -5 -10 -20 -30 - - - - - -0.00 -0.05 -0.10 -0.15 - -4 + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +4 - - + + - + - - - - - - - - -5 -10 -20 -30 - - - - - -0.00 -0.05 -0.10 -0.15 - -6 + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +6 - - + + - + - - - - - - - - -5 -10 -20 -30 - - - - - -0.00 -0.05 -0.10 -0.15 - -8 - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +5 +10 +15 +20 +25 +30 +35 + + + + + +0.00 +0.05 +0.10 +0.15 + +8 + + + + + + + + + + + + + + + + + + + + + - - + + - + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_density_fancy.svg b/inst/tinytest/_tinysnapshot/facet_density_fancy.svg index a7e77032..e0cc73b8 100644 --- a/inst/tinytest/_tinysnapshot/facet_density_fancy.svg +++ b/inst/tinytest/_tinysnapshot/facet_density_fancy.svg @@ -21,184 +21,191 @@ - - -am -0 -1 + + +am +0 +1 - - + + - -Car efficiency -Notes: Broken out by cylinder and transmission -N = [3, 8, 4, ...] Joint Bandwidth = 0.9703 + +Car efficiency +Notes: Broken out by cylinder and transmission +N = [3, 8, 4, ...] Joint Bandwidth = 0.9703 Density - - + + - + - - - - - - - -10 -15 -20 -25 -30 -35 - - - - - -0.0 -0.1 -0.2 -0.3 - - - - - - - - - - - - - - - - + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + +0.0 +0.1 +0.2 +0.3 + + + + + + + + + + + + + + + + -4 +4 - - + + - + - - - - - - - -10 -15 -20 -25 -30 -35 - - - - - - - - - - - - - - - - + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + + + + + + + + + + + + -6 +6 - - + + - + - - - - - - - -10 -15 -20 -25 -30 -35 - - - - - - - - - - - - - - - - + + + + + + + +10 +15 +20 +25 +30 +35 + + + + + + + + + + + + + + + + -8 +8 - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_fancy.svg b/inst/tinytest/_tinysnapshot/facet_fancy.svg index 8c5e4f97..bcd8b420 100644 --- a/inst/tinytest/_tinysnapshot/facet_fancy.svg +++ b/inst/tinytest/_tinysnapshot/facet_fancy.svg @@ -21,194 +21,194 @@ - - -Transmission -0 -1 + + +Transmission +0 +1 - - + + - -Car efficiency -Notes: Broken out by cylinder and transmission -Weight + +Car efficiency +Notes: Broken out by cylinder and transmission +Weight MPG - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - - - - - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + + + + + + + + + + + + + + + + -6 +6 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + + + + + + + + + + + -4 +4 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - - - - - - - - - - - + + + + + +2 +3 +4 +5 + + + + + + + + + + + + + + + + -8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_fmar_args.svg b/inst/tinytest/_tinysnapshot/facet_fmar_args.svg new file mode 100644 index 00000000..b10c9066 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_fmar_args.svg @@ -0,0 +1,264 @@ + + + + + + + + + + + + +wt +mpg + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg b/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg new file mode 100644 index 00000000..b10c9066 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/facet_fmar_par2.svg @@ -0,0 +1,264 @@ + + + + + + + + + + + + +wt +mpg + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.1 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.0 + + + + + + + + + + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/facet_interaction.svg b/inst/tinytest/_tinysnapshot/facet_interaction.svg index 9ce43c25..7c7994e7 100644 --- a/inst/tinytest/_tinysnapshot/facet_interaction.svg +++ b/inst/tinytest/_tinysnapshot/facet_interaction.svg @@ -26,240 +26,240 @@ mpg - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4.0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4.0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8.1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8.1 - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg index 454650a2..b7188578 100644 --- a/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg +++ b/inst/tinytest/_tinysnapshot/facet_interaction_newline.svg @@ -26,246 +26,246 @@ mpg - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6 -1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6 +1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4 -1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 +1 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -6 -0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +6 +0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8 -0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8 +0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -4 -0 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 +0 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - -8 -1 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +8 +1 - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon.svg b/inst/tinytest/_tinysnapshot/facet_ribbon.svg index ae65fade..c88aa6b6 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon.svg @@ -25,115 +25,115 @@ fit - - + + - + - - - - - -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/facet_ribbon_add.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg index a1cfabe7..3f190eef 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_add.svg @@ -25,167 +25,167 @@ mpg - - + + - + - - - - - -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 - -4 + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + +4 - - + + - + - - - - - -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/facet_ribbon_by.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg index ad6538e7..24fb14ed 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_by.svg @@ -21,151 +21,151 @@ - - - - -am -0 -1 + + + + +am +0 +1 - - + + - -wt + +wt fit - - + + - + - - - - - -2 -3 -4 -5 - - - - - - - -10 -15 -20 -25 -30 -35 - -4 + + + + + +2 +3 +4 +5 + + + + + + + +10 +15 +20 +25 +30 +35 + +4 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - - -10 -15 -20 -25 -30 -35 - -6 + + + + + +2 +3 +4 +5 + + + + + + + +10 +15 +20 +25 +30 +35 + +6 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - - -10 -15 -20 -25 -30 -35 - -8 + + + + + +2 +3 +4 +5 + + + + + + + +10 +15 +20 +25 +30 +35 + +8 - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg index 5df9c5df..86aadc21 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_by_equal.svg @@ -21,148 +21,148 @@ - - - - - - -cyl -4 -6 -8 + + + + + + +cyl +4 +6 +8 - - + + - -wt + +wt fit - - + + - + - - - - - -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/facet_ribbon_fancy_add.svg b/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg index 238a62a9..756e5a35 100644 --- a/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg +++ b/inst/tinytest/_tinysnapshot/facet_ribbon_fancy_add.svg @@ -21,257 +21,257 @@ - - -Transmission -0 -1 + + +Transmission +0 +1 - - + + - -Car efficiency -Notes: Broken out by cylinder and transmission -Weight + +Car efficiency +Notes: Broken out by cylinder and transmission +Weight MPG - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -6 +6 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -4 +4 - - + + - + - - - - - -2 -3 -4 -5 - - - - - - -10 -15 -20 -25 -30 - + + + + + +2 +3 +4 +5 + + + + + + +10 +15 +20 +25 +30 + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -8 +8 - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + - - + + - + - - + + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + diff --git a/inst/tinytest/_tinysnapshot/legend_default_legend.svg b/inst/tinytest/_tinysnapshot/legend_default_legend.svg index 335baea0..9aa41c7f 100644 --- a/inst/tinytest/_tinysnapshot/legend_default_legend.svg +++ b/inst/tinytest/_tinysnapshot/legend_default_legend.svg @@ -21,211 +21,213 @@ - - - - - - -Month of the year -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + + +Month of the year +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_density_legend.svg b/inst/tinytest/_tinysnapshot/legend_density_legend.svg deleted file mode 100644 index beacab86..00000000 --- a/inst/tinytest/_tinysnapshot/legend_density_legend.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - -Month of the year -5 -6 -7 -8 -9 - - - - - - - -50 -60 -70 -80 -90 -100 - - - - - - -0.00 -0.02 -0.04 -0.06 -0.08 - - - - - - - - - - - - - - - - - - - - -density.default(x = Temp) -N = [31, 30, 31, ...] Joint Bandwidth = 2.649 -Density - - diff --git a/inst/tinytest/_tinysnapshot/legend_false.svg b/inst/tinytest/_tinysnapshot/legend_false.svg index 116eaecc..79a312c7 100644 --- a/inst/tinytest/_tinysnapshot/legend_false.svg +++ b/inst/tinytest/_tinysnapshot/legend_false.svg @@ -21,6 +21,8 @@ +Day +Temp @@ -207,8 +209,4 @@ - -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/legend_formula_legend.svg b/inst/tinytest/_tinysnapshot/legend_formula_legend.svg index 335baea0..9aa41c7f 100644 --- a/inst/tinytest/_tinysnapshot/legend_formula_legend.svg +++ b/inst/tinytest/_tinysnapshot/legend_formula_legend.svg @@ -21,211 +21,213 @@ - - - - - - -Month of the year -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + + +Month of the year +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_bottom_.svg b/inst/tinytest/_tinysnapshot/legend_keyword_bottom_.svg deleted file mode 100644 index 63f5cb80..00000000 --- a/inst/tinytest/_tinysnapshot/legend_keyword_bottom_.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Day -Temp - - diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_bottomleft_.svg b/inst/tinytest/_tinysnapshot/legend_keyword_bottomleft_.svg deleted file mode 100644 index d94adf90..00000000 --- a/inst/tinytest/_tinysnapshot/legend_keyword_bottomleft_.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Day -Temp - - diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_default.svg b/inst/tinytest/_tinysnapshot/legend_keyword_default.svg index 63f5cb80..b9863c38 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_default.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_default.svg @@ -21,210 +21,212 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_density.svg b/inst/tinytest/_tinysnapshot/legend_keyword_density.svg index 30869181..e8cd191e 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_density.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_density.svg @@ -21,63 +21,65 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - -50 -60 -70 -80 -90 -100 - - - - - - -0.00 -0.02 -0.04 -0.06 -0.08 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - + +density.default(x = Temp) +N = [31, 30, 31, ...] Joint Bandwidth = 2.649 +Density + + + + + + + + + +50 +60 +70 +80 +90 +100 + + + + + + +0.00 +0.02 +0.04 +0.06 +0.08 + - - + + - -density.default(x = Temp) -N = [31, 30, 31, ...] Joint Bandwidth = 2.649 -Density + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_formula.svg b/inst/tinytest/_tinysnapshot/legend_keyword_formula.svg index 63f5cb80..b9863c38 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_formula.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_formula.svg @@ -21,210 +21,212 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_left_.svg b/inst/tinytest/_tinysnapshot/legend_keyword_left_.svg deleted file mode 100644 index 7a5c6054..00000000 --- a/inst/tinytest/_tinysnapshot/legend_keyword_left_.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Day -Temp - - diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_outerbottom.svg b/inst/tinytest/_tinysnapshot/legend_keyword_outerbottom.svg index 63f5cb80..b9863c38 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_outerbottom.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_outerbottom.svg @@ -21,210 +21,212 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_outerbottomleft.svg b/inst/tinytest/_tinysnapshot/legend_keyword_outerbottomleft.svg index d94adf90..987a6b80 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_outerbottomleft.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_outerbottomleft.svg @@ -21,210 +21,212 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_outerleft.svg b/inst/tinytest/_tinysnapshot/legend_keyword_outerleft.svg index 7a5c6054..bf14215a 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_outerleft.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_outerleft.svg @@ -21,210 +21,212 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + +Month +5 +6 +7 +8 +9 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_outertop.svg b/inst/tinytest/_tinysnapshot/legend_keyword_outertop.svg index 9cc4e8ae..4cab642a 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_outertop.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_outertop.svg @@ -21,17 +21,28 @@ - - - - - -Month -5 -6 -7 -8 -9 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + @@ -47,184 +58,175 @@ 20 25 30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_outertopright.svg b/inst/tinytest/_tinysnapshot/legend_keyword_outertopright.svg index 65a38c68..ef9e2ffb 100644 --- a/inst/tinytest/_tinysnapshot/legend_keyword_outertopright.svg +++ b/inst/tinytest/_tinysnapshot/legend_keyword_outertopright.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_top_.svg b/inst/tinytest/_tinysnapshot/legend_keyword_top_.svg deleted file mode 100644 index 9cc4e8ae..00000000 --- a/inst/tinytest/_tinysnapshot/legend_keyword_top_.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Day -Temp - - diff --git a/inst/tinytest/_tinysnapshot/legend_keyword_topright_.svg b/inst/tinytest/_tinysnapshot/legend_keyword_topright_.svg deleted file mode 100644 index 65a38c68..00000000 --- a/inst/tinytest/_tinysnapshot/legend_keyword_topright_.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Day -Temp - - diff --git a/inst/tinytest/_tinysnapshot/legend_lmar_bottom.svg b/inst/tinytest/_tinysnapshot/legend_lmar_bottom.svg new file mode 100644 index 00000000..96647480 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_lmar_bottom.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_lmar_left.svg b/inst/tinytest/_tinysnapshot/legend_lmar_left.svg new file mode 100644 index 00000000..2e3a48f4 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_lmar_left.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_lmar_right.svg b/inst/tinytest/_tinysnapshot/legend_lmar_right.svg new file mode 100644 index 00000000..31a1141e --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_lmar_right.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_lmar_top.svg b/inst/tinytest/_tinysnapshot/legend_lmar_top.svg new file mode 100644 index 00000000..106c3527 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_lmar_top.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_long_left.svg b/inst/tinytest/_tinysnapshot/legend_long_left.svg new file mode 100644 index 00000000..de80f5e3 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_long_left.svg @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + +What month of the year is it? +5 +6 +7 +8 +9 + + + + + + + +Multiline title +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_long_right.svg b/inst/tinytest/_tinysnapshot/legend_long_right.svg new file mode 100644 index 00000000..e0723efe --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_long_right.svg @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + +What month of the year is it? +5 +6 +7 +8 +9 + + + + + + + +Long title +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_multiline_bottom.svg b/inst/tinytest/_tinysnapshot/legend_multiline_bottom.svg new file mode 100644 index 00000000..909b3315 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_multiline_bottom.svg @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + +Month +of +the +year +5 +6 +7 +8 +9 + + + + + + + +Multiline title +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_multiline_top.svg b/inst/tinytest/_tinysnapshot/legend_multiline_top.svg new file mode 100644 index 00000000..e75d6897 --- /dev/null +++ b/inst/tinytest/_tinysnapshot/legend_multiline_top.svg @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + +Month +of +the +year +5 +6 +7 +8 +9 + + + + + + + +Multiline title +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_title_null.svg b/inst/tinytest/_tinysnapshot/legend_title_null.svg index 52e2c5e1..57e00bb7 100644 --- a/inst/tinytest/_tinysnapshot/legend_title_null.svg +++ b/inst/tinytest/_tinysnapshot/legend_title_null.svg @@ -21,31 +21,42 @@ - - - - - -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -55,175 +66,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_true.svg b/inst/tinytest/_tinysnapshot/legend_true.svg index 032cf32c..9010de4e 100644 --- a/inst/tinytest/_tinysnapshot/legend_true.svg +++ b/inst/tinytest/_tinysnapshot/legend_true.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_user_labs.svg b/inst/tinytest/_tinysnapshot/legend_user_labs.svg index 54f8aa1d..7ef25f1d 100644 --- a/inst/tinytest/_tinysnapshot/legend_user_labs.svg +++ b/inst/tinytest/_tinysnapshot/legend_user_labs.svg @@ -21,32 +21,43 @@ - - - - - -Month -May -Jun -Jul -Aug -Sep - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +May +Jun +Jul +Aug +Sep + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - -Day -Temp + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/legend_user_labs_override.svg b/inst/tinytest/_tinysnapshot/legend_user_labs_override.svg index 032cf32c..9010de4e 100644 --- a/inst/tinytest/_tinysnapshot/legend_user_labs_override.svg +++ b/inst/tinytest/_tinysnapshot/legend_user_labs_override.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/palette_function.svg b/inst/tinytest/_tinysnapshot/palette_function.svg index 71742846..cff596b5 100644 --- a/inst/tinytest/_tinysnapshot/palette_function.svg +++ b/inst/tinytest/_tinysnapshot/palette_function.svg @@ -21,28 +21,39 @@ - - - -Species -setosa -versicolor -virginica - - - - - - - - -1 -2 -3 -4 -5 -6 -7 + + + +Species +setosa +versicolor +virginica + + + + + + + +Petal.Length +Sepal.Length + + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 @@ -60,172 +71,163 @@ 7.0 7.5 8.0 - - - - - - - - -Petal.Length -Sepal.Length + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/palette_keyword.svg b/inst/tinytest/_tinysnapshot/palette_keyword.svg index ed51954c..dbbcf186 100644 --- a/inst/tinytest/_tinysnapshot/palette_keyword.svg +++ b/inst/tinytest/_tinysnapshot/palette_keyword.svg @@ -21,28 +21,39 @@ - - - -Species -setosa -versicolor -virginica - - - - - - - - -1 -2 -3 -4 -5 -6 -7 + + + +Species +setosa +versicolor +virginica + + + + + + + +Petal.Length +Sepal.Length + + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 @@ -60,172 +71,163 @@ 7.0 7.5 8.0 - - - - - - - - -Petal.Length -Sepal.Length + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/palette_keyword2.svg b/inst/tinytest/_tinysnapshot/palette_keyword2.svg index af4d1cf2..15c48311 100644 --- a/inst/tinytest/_tinysnapshot/palette_keyword2.svg +++ b/inst/tinytest/_tinysnapshot/palette_keyword2.svg @@ -21,28 +21,39 @@ - - - -Species -setosa -versicolor -virginica - - - - - - - - -1 -2 -3 -4 -5 -6 -7 + + + +Species +setosa +versicolor +virginica + + + + + + + +Petal.Length +Sepal.Length + + + + + + + + + + +1 +2 +3 +4 +5 +6 +7 @@ -60,172 +71,163 @@ 7.0 7.5 8.0 - - - - - - - - -Petal.Length -Sepal.Length + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/par_restore_FALSE.svg b/inst/tinytest/_tinysnapshot/par_restore_FALSE.svg index 009a6e27..712f7c0d 100644 --- a/inst/tinytest/_tinysnapshot/par_restore_FALSE.svg +++ b/inst/tinytest/_tinysnapshot/par_restore_FALSE.svg @@ -23,34 +23,34 @@ - - + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - -2 -4 -6 -8 -10 + + + + + + +2 +4 +6 +8 +10 @@ -62,15 +62,15 @@ 6 8 10 - + - - + + - -Index + +Index 1:10 diff --git a/inst/tinytest/_tinysnapshot/par_restore_bottom.svg b/inst/tinytest/_tinysnapshot/par_restore_bottom.svg index c346ceae..79a92bd2 100644 --- a/inst/tinytest/_tinysnapshot/par_restore_bottom.svg +++ b/inst/tinytest/_tinysnapshot/par_restore_bottom.svg @@ -21,224 +21,224 @@ - - - - -Species -setosa -versicolor -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 - + + + + +Species +setosa +versicolor +virginica - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +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 + - - + + - -Sepal.Length -Sepal.Width - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/pointrange_errorbar.svg b/inst/tinytest/_tinysnapshot/pointrange_errorbar.svg index e696550e..a783e435 100644 --- a/inst/tinytest/_tinysnapshot/pointrange_errorbar.svg +++ b/inst/tinytest/_tinysnapshot/pointrange_errorbar.svg @@ -21,6 +21,8 @@ +x +y @@ -66,8 +68,4 @@ - -x -y - diff --git a/inst/tinytest/_tinysnapshot/pointrange_triangle.svg b/inst/tinytest/_tinysnapshot/pointrange_triangle.svg index 088d7b28..fcd4b12f 100644 --- a/inst/tinytest/_tinysnapshot/pointrange_triangle.svg +++ b/inst/tinytest/_tinysnapshot/pointrange_triangle.svg @@ -21,6 +21,8 @@ +1:4 +y @@ -64,8 +66,4 @@ - -1:4 -y - diff --git a/inst/tinytest/_tinysnapshot/readme_base_1.svg b/inst/tinytest/_tinysnapshot/readme_base_1.svg index 5f737ebd..da30efca 100644 --- a/inst/tinytest/_tinysnapshot/readme_base_1.svg +++ b/inst/tinytest/_tinysnapshot/readme_base_1.svg @@ -84,6 +84,16 @@ + + + + + + +plot2 +Index +0:10 + @@ -124,14 +134,4 @@ - - - - - - -plot2 -Index -0:10 - diff --git a/inst/tinytest/_tinysnapshot/readme_base_2.svg b/inst/tinytest/_tinysnapshot/readme_base_2.svg index 94a7f2c2..0fdc9061 100644 --- a/inst/tinytest/_tinysnapshot/readme_base_2.svg +++ b/inst/tinytest/_tinysnapshot/readme_base_2.svg @@ -423,6 +423,16 @@ + + + + + + +plot2 +airquality$Day +airquality$Temp + @@ -606,21 +616,21 @@ - - + + - -plot2 -airquality$Day -airquality$Temp + - - + + - + +plot2 (formula) +Day +Temp @@ -804,14 +814,4 @@ - - - - - - -plot2 (formula) -Day -Temp - diff --git a/inst/tinytest/_tinysnapshot/readme_basetheme_royal.svg b/inst/tinytest/_tinysnapshot/readme_basetheme_royal.svg index 9dcfbe15..4d0d1640 100644 --- a/inst/tinytest/_tinysnapshot/readme_basetheme_royal.svg +++ b/inst/tinytest/_tinysnapshot/readme_basetheme_royal.svg @@ -23,45 +23,65 @@ - - + + - - + + + + + + + + + + - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Daily temperatures by month +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -71,289 +91,298 @@ 70 80 90 - + - - - - - - -Daily temperatures by month -Day -Temp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_by.svg b/inst/tinytest/_tinysnapshot/readme_by.svg index 32cb9471..2864da12 100644 --- a/inst/tinytest/_tinysnapshot/readme_by.svg +++ b/inst/tinytest/_tinysnapshot/readme_by.svg @@ -21,32 +21,43 @@ - - - - - -airquality$Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +airquality$Month +5 +6 +7 +8 +9 + + + + + + + +airquality$Day +airquality$Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -airquality$Day -airquality$Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_by_lty.svg b/inst/tinytest/_tinysnapshot/readme_by_lty.svg index 46a8b297..c19369eb 100644 --- a/inst/tinytest/_tinysnapshot/readme_by_lty.svg +++ b/inst/tinytest/_tinysnapshot/readme_by_lty.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_density_topright.svg b/inst/tinytest/_tinysnapshot/readme_density_topright.svg deleted file mode 100644 index 34e4b99c..00000000 --- a/inst/tinytest/_tinysnapshot/readme_density_topright.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - -50 -60 -70 -80 -90 -100 - - - - - - -0.00 -0.02 -0.04 -0.06 -0.08 - - - - - - - - - - - - - - - -density.default(x = Temp) -N = [31, 30, 31, ...] Joint Bandwidth = 2.649 -Density - - diff --git a/inst/tinytest/_tinysnapshot/readme_formula.svg b/inst/tinytest/_tinysnapshot/readme_formula.svg index 032cf32c..9010de4e 100644 --- a/inst/tinytest/_tinysnapshot/readme_formula.svg +++ b/inst/tinytest/_tinysnapshot/readme_formula.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_hershey_plus.svg b/inst/tinytest/_tinysnapshot/readme_hershey_plus.svg index 6fa70ad7..3179cbf7 100644 --- a/inst/tinytest/_tinysnapshot/readme_hershey_plus.svg +++ b/inst/tinytest/_tinysnapshot/readme_hershey_plus.svg @@ -21,311 +21,894 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -471,868 +1054,315 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_legend_bottom.svg b/inst/tinytest/_tinysnapshot/readme_legend_bottom.svg index e9810e73..6df033b2 100644 --- a/inst/tinytest/_tinysnapshot/readme_legend_bottom.svg +++ b/inst/tinytest/_tinysnapshot/readme_legend_bottom.svg @@ -21,63 +21,65 @@ - - - - - - -Month of the year -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 - - - - - -60 -70 -80 -90 - + + + + + + +Month of the year +5 +6 +7 +8 +9 - - + + - - - - - - + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 + + + + + +60 +70 +80 +90 + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_palette_tableau.svg b/inst/tinytest/_tinysnapshot/readme_palette_tableau.svg index 1aa09b36..5aacaa3a 100644 --- a/inst/tinytest/_tinysnapshot/readme_palette_tableau.svg +++ b/inst/tinytest/_tinysnapshot/readme_palette_tableau.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_pch_16.svg b/inst/tinytest/_tinysnapshot/readme_pch_16.svg index b791d939..87cefd48 100644 --- a/inst/tinytest/_tinysnapshot/readme_pch_16.svg +++ b/inst/tinytest/_tinysnapshot/readme_pch_16.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/readme_pointrange.svg b/inst/tinytest/_tinysnapshot/readme_pointrange.svg index bb73de3e..eba93c9a 100644 --- a/inst/tinytest/_tinysnapshot/readme_pointrange.svg +++ b/inst/tinytest/_tinysnapshot/readme_pointrange.svg @@ -21,6 +21,9 @@ +Effect on Temperature +term +estimate @@ -62,9 +65,4 @@ - -Effect on Temperature -term -estimate - diff --git a/inst/tinytest/_tinysnapshot/readme_type_l.svg b/inst/tinytest/_tinysnapshot/readme_type_l.svg index 7d3ae2af..1e2b53c1 100644 --- a/inst/tinytest/_tinysnapshot/readme_type_l.svg +++ b/inst/tinytest/_tinysnapshot/readme_type_l.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ribbon.svg b/inst/tinytest/_tinysnapshot/ribbon.svg index ee5f202b..f17c6dd2 100644 --- a/inst/tinytest/_tinysnapshot/ribbon.svg +++ b/inst/tinytest/_tinysnapshot/ribbon.svg @@ -21,6 +21,8 @@ +wt +fit @@ -54,8 +56,4 @@ - -wt -fit - diff --git a/inst/tinytest/_tinysnapshot/ribbon_no_y.svg b/inst/tinytest/_tinysnapshot/ribbon_no_y.svg index 6dca5c26..115fc727 100644 --- a/inst/tinytest/_tinysnapshot/ribbon_no_y.svg +++ b/inst/tinytest/_tinysnapshot/ribbon_no_y.svg @@ -21,6 +21,8 @@ +wt +[lwr, upr] @@ -53,8 +55,4 @@ - -wt -[lwr, upr] - diff --git a/inst/tinytest/_tinysnapshot/type_c.svg b/inst/tinytest/_tinysnapshot/type_c.svg index 962feb1b..50096ddc 100644 --- a/inst/tinytest/_tinysnapshot/type_c.svg +++ b/inst/tinytest/_tinysnapshot/type_c.svg @@ -21,6 +21,8 @@ +Index +0:10 @@ -64,8 +66,4 @@ - -Index -0:10 - diff --git a/inst/tinytest/_tinysnapshot/type_c_group.svg b/inst/tinytest/_tinysnapshot/type_c_group.svg index 3b8cc488..92ef712c 100644 --- a/inst/tinytest/_tinysnapshot/type_c_group.svg +++ b/inst/tinytest/_tinysnapshot/type_c_group.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,135 +67,126 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/type_cap_s.svg b/inst/tinytest/_tinysnapshot/type_cap_s.svg index 87256857..0826f310 100644 --- a/inst/tinytest/_tinysnapshot/type_cap_s.svg +++ b/inst/tinytest/_tinysnapshot/type_cap_s.svg @@ -21,6 +21,8 @@ +Index +0:10 @@ -55,8 +57,4 @@ - -Index -0:10 - diff --git a/inst/tinytest/_tinysnapshot/type_cap_s_group.svg b/inst/tinytest/_tinysnapshot/type_cap_s_group.svg index 5370bc57..78eaaaf0 100644 --- a/inst/tinytest/_tinysnapshot/type_cap_s_group.svg +++ b/inst/tinytest/_tinysnapshot/type_cap_s_group.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/type_h.svg b/inst/tinytest/_tinysnapshot/type_h.svg index ad8ccebc..64e0530f 100644 --- a/inst/tinytest/_tinysnapshot/type_h.svg +++ b/inst/tinytest/_tinysnapshot/type_h.svg @@ -21,6 +21,8 @@ +Index +0:10 @@ -65,8 +67,4 @@ - -Index -0:10 - diff --git a/inst/tinytest/_tinysnapshot/type_h_group.svg b/inst/tinytest/_tinysnapshot/type_h_group.svg index 5eafe98e..c0e5d2a8 100644 --- a/inst/tinytest/_tinysnapshot/type_h_group.svg +++ b/inst/tinytest/_tinysnapshot/type_h_group.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,175 +67,166 @@ 70 80 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inst/tinytest/_tinysnapshot/type_s.svg b/inst/tinytest/_tinysnapshot/type_s.svg index f8f90472..17256133 100644 --- a/inst/tinytest/_tinysnapshot/type_s.svg +++ b/inst/tinytest/_tinysnapshot/type_s.svg @@ -21,6 +21,8 @@ +Index +0:10 @@ -55,8 +57,4 @@ - -Index -0:10 - diff --git a/inst/tinytest/_tinysnapshot/type_s_group.svg b/inst/tinytest/_tinysnapshot/type_s_group.svg index 50ad7a18..a12adfc6 100644 --- a/inst/tinytest/_tinysnapshot/type_s_group.svg +++ b/inst/tinytest/_tinysnapshot/type_s_group.svg @@ -21,32 +21,43 @@ - - - - - -Month -5 -6 -7 -8 -9 - - - - - - - - -0 -5 -10 -15 -20 -25 -30 + + + + + +Month +5 +6 +7 +8 +9 + + + + + + + +Day +Temp + + + + + + + + + + +0 +5 +10 +15 +20 +25 +30 @@ -56,27 +67,18 @@ 70 80 90 - - - - - - - - - - - - - + - - + + - -Day -Temp + + + + + + diff --git a/inst/tinytest/_tinysnapshot/ylab_good.svg b/inst/tinytest/_tinysnapshot/ylab_good.svg index ba112b86..2fe3a3fa 100644 --- a/inst/tinytest/_tinysnapshot/ylab_good.svg +++ b/inst/tinytest/_tinysnapshot/ylab_good.svg @@ -21,6 +21,8 @@ +Index +rnorm(1) @@ -55,8 +57,4 @@ - -Index -rnorm(1) - diff --git a/inst/tinytest/test-facet.R b/inst/tinytest/test-facet.R index 5a5ba882..697dc42b 100644 --- a/inst/tinytest/test-facet.R +++ b/inst/tinytest/test-facet.R @@ -17,6 +17,40 @@ f = function() { } expect_snapshot_plot(f, label = "facet") +f = function() { + with( + mtcars, + plot2( + x = wt, y = mpg, + facet = am + ) + ) +} +expect_snapshot_plot(f, label = "facet_1x2") + +f = function() { + with( + mtcars, + plot2( + x = wt, y = mpg, + facet = am, + facet.args = list(ncol = 1) + ) + ) +} +expect_snapshot_plot(f, label = "facet_2x1") + +f = function() { + with( + mtcars, + plot2( + x = wt, y = mpg, + facet = interaction(am, vs) + ) + ) +} +expect_snapshot_plot(f, label = "facet_2x2") + f = function() { with( mtcars, @@ -98,7 +132,34 @@ if (getRversion() <= "4.3.2") { } +# +## facet margins (fmar) +f = function() { + ofmar = par2("fmar") + par2(fmar = c(1,1,0.5,2)) + with( + mtcars, + plot2( + x = wt, y = mpg, + facet = interaction(cyl, am) + ) + ) + par2(fmar = ofmar) +} +expect_snapshot_plot(f, label = "facet_fmar_par2") + +f = function() { + with( + mtcars, + plot2( + x = wt, y = mpg, + facet = interaction(cyl, am), + facet.args = list(fmar = c(1,1,0.5,2)) + ) + ) +} +expect_snapshot_plot(f, label = "facet_fmar_args") # ## Ribbon plot versions diff --git a/inst/tinytest/test-legend.R b/inst/tinytest/test-legend.R index c0162235..b8ee1c9f 100644 --- a/inst/tinytest/test-legend.R +++ b/inst/tinytest/test-legend.R @@ -18,7 +18,7 @@ expect_snapshot_plot(f, label = "legend_true") f = function() with(airquality, plot2(x = Day, y = Temp, by = Month, legend = "bottom!")) expect_snapshot_plot(f, label = "legend_keyword_default") -if ((getRversion() <= "4.3.1")) { +if ((getRversion() <= "4.3.2")) { f = function() with(airquality, plot2(x = density(Temp), by = Month, legend = "bottom!")) expect_snapshot_plot(f, label = "legend_keyword_density") } @@ -39,6 +39,33 @@ expect_snapshot_plot(f, label = "legend_keyword_outertopright") f = function() plot2(Temp ~ Day | Month, data = airquality, legend = "bottomleft!") expect_snapshot_plot(f, label = "legend_keyword_outerbottomleft") +# Long legend titles + +f = function() plot2( + Temp ~ Day | Month, data = airquality, main = "Long title", + legend = list("right!", title = "What month of the year is it?", bty = "o") +) +expect_snapshot_plot(f, label = "legend_long_right") + +f = function() plot2( + Temp ~ Day | Month, data = airquality, main = "Multiline title", + legend = list("left!", title = "What month of the year is it?", bty = "o") +) +expect_snapshot_plot(f, label = "legend_long_left") + +# multi-line legend titles + +f = function() plot2( + Temp ~ Day | Month, data = airquality, main = "Multiline title", + legend = list("top!", title = "Month\nof\nthe\nyear", bty = "o") +) +expect_snapshot_plot(f, label = "legend_multiline_top") + +f = function() plot2( + Temp ~ Day | Month, data = airquality, main = "Multiline title", + legend = list("bottom!", title = "Month\nof\nthe\nyear", bty = "o") +) +expect_snapshot_plot(f, label = "legend_multiline_bottom") # legend function examples @@ -47,8 +74,8 @@ f = function() with( plot2( x = Day, y = Temp, by = Month, legend = legend("bottom!", title = "Month of the year", bty = "o") - ) ) +) expect_snapshot_plot(f, label = "legend_default_legend") if ((getRversion() <= "4.3.1")) { @@ -57,35 +84,71 @@ if ((getRversion() <= "4.3.1")) { plot2( x = density(Temp), by = Month, legend = legend("bottom!", title = "Month of the year", bty = "o") - ) ) + ) expect_snapshot_plot(f, label = "legend_density_legend") } f = function() plot2( Temp ~ Day | Month, data = airquality, legend = legend("bottom!", title = "Month of the year", bty = "o") - ) +) expect_snapshot_plot(f, label = "legend_formula_legend") f = function() plot2( Temp ~ Day | Month, data = airquality, legend = legend(title = NULL) - ) +) expect_snapshot_plot(f, label = "legend_title_null") f = function() plot2( Temp ~ Day | Month, data = airquality, legend = legend(legend = month.abb[5:9]) - ) +) expect_snapshot_plot(f, label = "legend_user_labs") f = function() plot2( Temp ~ Day | Month, data = airquality, legend = legend(legend = month.abb[5:10]) - ) +) expect_warning(expect_snapshot_plot(f, label = "legend_user_labs_override")) +# override default legend margins with par2("lmar") + +f = function() { + olmar = par2("lmar") + par2(lmar = c(1.5, 0.5)) + plot2(Temp ~ Day | Month, data = airquality, legend = list("right!", bty = "o")) + box("figure", lty = 2, col = "blue") + par2(lmar = olmar) +} +expect_snapshot_plot(f, label = "legend_lmar_right") +f = function() { + olmar = par2("lmar") + par2(lmar = c(1.5, 0.5)) + plot2(Temp ~ Day | Month, data = airquality, legend = list("left!", bty = "o")) + box("figure", lty = 2, col = "blue") + par2(lmar = olmar) +} +expect_snapshot_plot(f, label = "legend_lmar_left") +f = function() { + olmar = par2("lmar") + par2(lmar = c(1.5, 0.5)) + plot2(Temp ~ Day | Month, data = airquality, legend = list("bottom!", bty = "o")) + box("figure", lty = 2, col = "blue") + par2(lmar = olmar) +} +expect_snapshot_plot(f, label = "legend_lmar_bottom") +f = function() { + olmar = par2("lmar") + par2(lmar = c(1.5, 0.5)) + plot2(Temp ~ Day | Month, data = airquality, legend = list("top!", bty = "o")) + box("figure", lty = 2, col = "blue") + par2(lmar = olmar) +} +expect_snapshot_plot(f, label = "legend_lmar_top") + + # reset par par(op) diff --git a/man/draw_legend.Rd b/man/draw_legend.Rd index f961c92b..bb99ede9 100644 --- a/man/draw_legend.Rd +++ b/man/draw_legend.Rd @@ -15,6 +15,8 @@ draw_legend( col = NULL, bg = NULL, cex = NULL, + lmar = NULL, + has_sub = FALSE, new_plot = TRUE ) } @@ -39,9 +41,68 @@ draw_legend( \item{cex}{Plotting character expansion(s), passed down from \code{plot2}.} +\item{lmar}{Legend margins (in lines). Should be a numeric vector of the form +\code{c(inner, outer)}, where the first number represents the "inner" margin +between the legend and the plot, and the second number represents the +"outer" margin between the legend and edge of the graphics device. If no +explicit value is provided by the user, then reverts back to \code{par2("lmar")} +for which the default values are \code{c(1.0, 0.1)}.} + +\item{has_sub}{Logical. Does the plot have a sub-caption. Only used if +keyword position is "bottom!", in which case we need to bump the legend +margin a bit further.} + \item{new_plot}{Should we be calling plot.new internally?} } \description{ Internal function used to calculate the placement of (including outside the plotting area) and drawing of legend. } +\examples{ + +oldmar = par("mar") + +draw_legend( + legend = "right!", ## default (other options incl, "left(!)", ""bottom(!)", etc.) + legend.args = list(title = "Key", bty = "o"), + lgnd_labs = c("foo", "bar"), + type = "p", + pch = 21:22, + col = 1:2 +) + +# The legend is placed in the outer margin... +box("figure", col = "cyan", lty = 4) +# ... and the plot is proportionally adjusted against the edge of this +# margin. +box("plot") +# You can add regular plot objects per normal now +plot.window(xlim = c(1,10), ylim = c(1,10)) +points(1:10) +points(10:1, pch = 22, col = "red") +axis(1); axis(2) +# etc. + +# Important: A side effect of draw_legend is that the inner margins have been +# adjusted. (Here: The right margin, since we called "right!" above.) +par("mar") + +# To reset you should call `dev.off()` or just reset manually. +par(mar = oldmar) + +# Note that the inner and outer margin of the legend itself can be set via +# the `lmar` argument. (This can also be set globally via +# `par2(lmar = c(inner, outer))`.) +draw_legend( + legend.args = list(title = "Key", bty = "o"), + lgnd_labs = c("foo", "bar"), + type = "p", + pch = 21:22, + col = 1:2, + lmar = c(0, 0.1) ## set inner margin to zero +) +box("figure", col = "cyan", lty = 4) + +par(mar = oldmar) + +} diff --git a/man/figures/README-quickstart-1.png b/man/figures/README-quickstart-1.png index ace3e579..d91ee9eb 100644 Binary files a/man/figures/README-quickstart-1.png and b/man/figures/README-quickstart-1.png differ diff --git a/man/figures/README-quickstart-2.png b/man/figures/README-quickstart-2.png index c78b4ffb..e4527d66 100644 Binary files a/man/figures/README-quickstart-2.png and b/man/figures/README-quickstart-2.png differ diff --git a/man/figures/README-quickstart-3.png b/man/figures/README-quickstart-3.png index a95ae781..a98f899f 100644 Binary files a/man/figures/README-quickstart-3.png and b/man/figures/README-quickstart-3.png differ diff --git a/man/figures/README-quickstart-4.png b/man/figures/README-quickstart-4.png index 7d69b457..a07a97ab 100644 Binary files a/man/figures/README-quickstart-4.png and b/man/figures/README-quickstart-4.png differ diff --git a/man/figures/README/figure-markdown_strict/quickstart-1.png b/man/figures/README/figure-markdown_strict/quickstart-1.png deleted file mode 100644 index ace3e579..00000000 Binary files a/man/figures/README/figure-markdown_strict/quickstart-1.png and /dev/null differ diff --git a/man/figures/README/figure-markdown_strict/quickstart-2.png b/man/figures/README/figure-markdown_strict/quickstart-2.png deleted file mode 100644 index c66eaf18..00000000 Binary files a/man/figures/README/figure-markdown_strict/quickstart-2.png and /dev/null differ diff --git a/man/figures/README/figure-markdown_strict/quickstart-3.png b/man/figures/README/figure-markdown_strict/quickstart-3.png deleted file mode 100644 index f332a35c..00000000 Binary files a/man/figures/README/figure-markdown_strict/quickstart-3.png and /dev/null differ diff --git a/man/figures/README/figure-markdown_strict/quickstart-4.png b/man/figures/README/figure-markdown_strict/quickstart-4.png deleted file mode 100644 index 193efd2e..00000000 Binary files a/man/figures/README/figure-markdown_strict/quickstart-4.png and /dev/null differ diff --git a/man/par2.Rd b/man/par2.Rd new file mode 100644 index 00000000..b372e486 --- /dev/null +++ b/man/par2.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/par2.R +\name{par2} +\alias{par2} +\title{Set or query plot2 parameters} +\usage{ +par2(...) +} +\arguments{ +\item{...}{arguments of the form \code{tag = value}. Supported \code{plot2} parameters +are described in the 'Graphical Parameters' section below.} +} +\description{ +\code{par2} can be used to set or query the additional set of +graphical parameters provided by \code{plot2} (i.e., beyond the base set +provided by \code{\link[graphics]{par}}). Similar to its base counterpart, parameters can be set +by passing the appropriate tag-value argument pairs to \code{par2}. Multiple +parameters can be set or queried at the same time, as a list. +} +\section{Graphical Parameters}{ + + +\tabular{lll}{ +\code{fmar} \tab\tab 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)}, i.e. a single line of padding around each facet. If more that three facets are detected, the \code{fmar} parameter is scaled by 0.75 (i.e., three-quarters) to reduce the excess whitespace that would otherwise arise due to the absent axes lines and labels. (An exception is made for 2x2 plots to better match the \code{cex} expansion logic of the base graphics system under this particular layout.) Similarly, note that an extra 0.5 lines is subtracted from each side of the facet padding for plots that aren't framed, to reduce excess whitespace.\cr +\tab\tab\cr +\tab\tab\cr +\code{last_facet_par} \tab\tab Full list of graphical parameters used to constructed the most recent faceted \code{plot2} plot during the current session. Unlike other \code{par2} parameters, this parameter is intended for internal use (specifically, to enable adding further elements on top of an existing faceted plot) and should \emph{not} be set by the user.\cr +\tab\tab\cr +\tab\tab\cr +\code{lmar} \tab\tab A numeric vector of form \code{c(inner, outer)} that gives the margin padding, in terms of lines, around the automatic \code{plot2} legend. Defaults to \code{c(1.0, 0.1)}, where the first number represents the "inner" margin between the legend and the plot region, and the second number represents the "outer" margin between the legend and edge of the graphics device. (Note that an exception for the definition of the "outer" legend margin occurs when the legend placement is \code{"top!"}, since the legend is placed above the plot region but below the main title. In such cases, the outer margin is relative to the existing gap between the title and the plot region, which is itself determined by \code{par("mar")[3]}.)\cr +} +} + diff --git a/man/plot2.Rd b/man/plot2.Rd index 5084fa2c..fad7e622 100644 --- a/man/plot2.Rd +++ b/man/plot2.Rd @@ -116,9 +116,21 @@ with \code{interaction(facet_var1, facet_var2)}. Also accepts the special "by" convenience keyword, in which case facets will match the grouping variable(s) above.} -\item{facet.args}{a list of arguments for controlling faceting behaviour. -Currently only \code{nrow} and \code{ncol} are supported, with the former superseding -the latter. Ignored if \code{facet} is NULL.} +\item{facet.args}{an optional list of arguments for controlling faceting +behaviour. (Ignored if \code{facet} is NULL.) Currently only the following are +supported: +\itemize{ +\item \code{nrow}, \code{ncol} for overriding the default "square" facet window +arrangement. Only one of these should be specified; if not then the former +will supersede the latter. +\item \code{fmar} a vector of form \code{c(b,l,t,r)} for controlling the base margin +between facets in terms of lines. Defaults to the value of \code{par2("fmar")}, +which should be \code{c(1,1,1,1)}, i.e. a single line of padding around each +individual facet, assuming it hasn't been overridden by the user as part +their global \code{par2} settings. Note some automatic adjustments are made for +certain layouts, and depending on whether the plot is framed or not, to +reduce excess whitespace. See \code{\link[plot2]{par2}} for more details. +}} \item{data}{a data.frame (or list) from which the variables in formula should be taken. A matrix is converted to a data frame.} diff --git a/vignettes/get_started.Rmd b/vignettes/get_started.Rmd index 9d750bcc..e7abbc87 100644 --- a/vignettes/get_started.Rmd +++ b/vignettes/get_started.Rmd @@ -39,6 +39,8 @@ par(mfrow = c(1, 2)) plot(0:10, main = "plot") plot2(0:10, main = "plot2") + +par(mfrow = c(1, 1)) # reset layout ``` Similarly, we can plot elements from a data frame using either the atomic or @@ -47,7 +49,7 @@ earlier. ```{r plot2_simple} # with(aq, plot2(Day, Temp)) # atomic method (same as below) -plot2(Temp ~ Day, data = aq) # formula method +plot2(Temp ~ Day, data = aq) # formula method ``` ## Grouped data @@ -153,11 +155,11 @@ palette("tableau") In all of the preceding plots, you will have noticed that we get an automatic legend. The legend position and look can be customized with the `legend` argument. At a minimum, you can pass the familiar legend position keywords as a -convenience string ("topright", "left", etc.). Moreover, a key feature of -`plot2` is that we can easily and elegantly place the legend _outside_ the plot -area by adding a trailing "!" to these keywords. (As you may have realised, the -default legend position is "right!".) Let's demonstrate by moving the legend to -the left of the plot: +convenience string ("topright", "bottom", "left", etc.). Moreover, a key feature +of `plot2` is that we can easily and elegantly place the legend _outside_ the +plot area by adding a trailing "!" to these keywords. (As you may have realised, +the default legend position is "right!".) Let's demonstrate by moving the legend +to the left of the plot: ```{r legend_bottom} plot2( @@ -253,10 +255,11 @@ with( ) ``` -By default, facets will be arranged in a square configuration (if more than -three facets are detected). Users can override this behaviour by supplying -`nrow` or `ncol` in the "facet.args" helper function. Note that we can also -reduce axis label redundancy by turning off the plot frame. +By default, facets will be arranged in a square configuration if more than +three facets are detected. Users can override this behaviour by supplying +`nrow` or `ncol` in the "facet.args" helper function. (The margin padding +between individual facets can also be adjusted via the `fmar` argument.) Note +that we can also reduce axis label redundancy by turning off the plot frame. ```{r facet_nrow} with(