Skip to content
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

Add type_rug() #276

Merged
merged 4 commits into from
Dec 15, 2024
Merged

Add type_rug() #276

merged 4 commits into from
Dec 15, 2024

Conversation

grantmcdermott
Copy link
Owner

Closes #275

Examples from the docs (although adding a theme for effect).

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

tinytheme("clean2")

tinyplot(~wt | am, data = mtcars, type = "density", facet = "by", fill = "by")
tinyplot_add(type = "rug")
# use type_rug() to pass extra options
tinyplot_add(type = type_rug(side = 3, ticksize = 0.05))

# For ties, use jittering
tinyplot(eruptions ~ waiting, data = faithful, type = "lm")
tinyplot_add(type = type_rug(jitter = TRUE, amount = 0.3))
tinyplot_add(type = type_rug(jitter = TRUE, amount = 0.1, side = 2))
# Add original points just for reference
tinyplot_add(type = "p")

Created on 2024-12-14 with reprex v2.1.1

@grantmcdermott grantmcdermott merged commit 14829e1 into main Dec 15, 2024
3 checks passed
@grantmcdermott grantmcdermott deleted the rug branch December 15, 2024 05:19
@zeileis
Copy link
Collaborator

zeileis commented Dec 15, 2024

Very cool 🤩

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.

"rug"
2 participants