Skip to content

Add type_rug()#276

Merged
grantmcdermott merged 4 commits intomainfrom
rug
Dec 15, 2024
Merged

Add type_rug()#276
grantmcdermott merged 4 commits intomainfrom
rug

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
@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