Skip to content

Pass par args via tpar#140

Merged
grantmcdermott merged 20 commits intomainfrom
tpar-pass
Mar 16, 2024
Merged

Pass par args via tpar#140
grantmcdermott merged 20 commits intomainfrom
tpar-pass

Conversation

@grantmcdermott
Copy link
Copy Markdown
Owner

@grantmcdermott grantmcdermott commented Mar 15, 2024

Closes #123.

MWE.

pkgload::load_all("~/Documents/Projects/tinyplot")
#> ℹ Loading tinyplot

# A plot with default params
tinyplot(mpg ~ wt, data = mtcars, facet = ~am)

# Set a mix of base and tinyplot global params
op = tpar(
    las       = 1,
    pch       = 2,
    facet.bg  = "grey90",
    facet.cex = 2,
    grid      = TRUE
)
# redraw the plot
tinyplot(mpg ~ wt, data = mtcars, facet = ~am)

# reset
tpar(op)
tinyplot(mpg ~ wt, data = mtcars, facet = ~am)

Created on 2024-03-15 with reprex v2.1.0

Still to do:

  • Update tests
  • Update vignette

(Maybe decide about supporting palette() setting too.)

@grantmcdermott grantmcdermott merged commit f3ef88b into main Mar 16, 2024
@grantmcdermott grantmcdermott deleted the tpar-pass branch January 22, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tpar() could pass extra arguments to par()

1 participant