-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facet to-do list #90
Comments
This is possible to do. But it ends up requiring more work internally than I initially anticipated. Reason: We have to manually reset For posterity, I just tested a MWE with a new
if (nfacets > 1) {
# ... [existing code]
if (isTRUE(facet.args[["free"]])) {
xlim = range(split(x, facet)[[ii]])
ylim = range(split(y, facet)[[ii]])
if (!is.null(ymin)) ylim = range(ylim, range(split(ymin, facet)[[ii]]))
if (!is.null(ymax)) ylim = range(ylim, range(split(ymax, facet)[[ii]]))
frame.plot = TRUE
}
}
if (nfacets > 1) {
# ... [existing code]
if (isTRUE(facet.args[["free"]])) {
xlim = range(xx)
ylim = range(yy)
if (!is.null(yymin)) ylim = range(ylim, range(yymin))
if (!is.null(yymax)) ylim = range(ylim, range(yymax))
xlim = extendrange(range(mtcars$wt),f=0.04)
par(usr = c(extendrange(xlim), extendrange(ylim)))
}
} This works: pkgload::load_all("~/Documents/Projects/tinyplot")
#> ℹ Loading tinyplot
tpar(facet.bg = "grey90")
plt(
mpg ~ wt, mtcars,
facet = cyl ~ am,
facet.args = list(free = TRUE), ## TEST
main = "Free facet axes scales/limits (example)"
) Created on 2024-03-09 with reprex v2.1.0 Buuut.... it seems fragile: I really don't like messing with |
Moved from #83.
y ~ x | by | facetrow ~ facetcol
? Decision: No.y ~ x | by, facet = TRUE
could treatby
as a facet variable and override the default grouping behaivour (distinct fromfacet = "by"
, which treats them as equivalent). Decision: No.cex
be adjusted to match the smaller facet elements (or, vice versa)? (Facet args (and some extras) #91)Relevant comments:
#83 (comment) (@zeileis)
#83 (comment) (@vincentarelbundock)
The text was updated successfully, but these errors were encountered: