Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Suggests:
knitr
Config/Needs/website: etiennebacher/altdoc, future.apply
Encoding: UTF-8
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
URL: https://grantmcdermott.com/tinyplot/
BugReports: https://github.com/grantmcdermott/tinyplot/issues
Roxygen: list(markdown = TRUE)
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ where the formatting is also better._
plot type internally coerces it to factor (e.g., `"boxplot"`)
- `type_text()` can now also deal with factor `x`/`y` variables by converting
them to numeric which helps to add text to barplots etc. (#470 @zeileis)
- Fix bug where sourced (non-interactive) scripts with `tinytheme()` calls were
not inheriting the correct LHS margin spacing. (#475 @grantmcdermott)


### Internals
Expand Down
6 changes: 4 additions & 2 deletions R/facet.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ draw_facet_window = function(
has_legend,
type,
x, xmax, xmin,
y, ymax, ymin
y, ymax, ymin,
dynmar = NULL
) {

# if add is TRUE, just return inputs without any calculations
Expand All @@ -53,7 +54,8 @@ draw_facet_window = function(
}

## dynamic margins flag
dynmar = isTRUE(.tpar[["dynmar"]])
if (is.null(dynmar)) dynmar = get_tpar("dynmar")
dynmar = isTRUE(dynmar)

## optionally allow to modify the style of axis interval calculation
if (!is.null(xaxs)) par(xaxs = xaxs)
Expand Down
6 changes: 4 additions & 2 deletions R/tinyplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,8 @@ tinyplot.default = function(
has_legend = has_legend,
type = type,
x = x, xmax = xmax, xmin = xmin,
y = y, ymax = ymax, ymin = ymin
y = y, ymax = ymax, ymin = ymin,
dynmar = dynmar
),
list = list(
add = add,
Expand All @@ -1252,7 +1253,8 @@ tinyplot.default = function(
has_legend = has_legend,
type = type,
x = datapoints$x, xmax = datapoints$xmax, xmin = datapoints$xmin,
y = datapoints$y, ymax = datapoints$ymax, ymin = datapoints$ymin
y = datapoints$y, ymax = datapoints$ymax, ymin = datapoints$ymin,
dynmar = get_tpar("dynmar") # https://github.com/grantmcdermott/tinyplot/issues/474
),
getNamespace("tinyplot")
)
Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cex_fct_adj",
"dots",
"draw",
"dynmar",
"facet_bg",
"facet_border",
"facet_col",
Expand Down
3 changes: 2 additions & 1 deletion man/facet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.