Skip to content

Conversation

@grantmcdermott
Copy link
Owner

Closes #524
Closes #525

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

models = list(
    "Model A" = lm(mpg ~ cyl, data = mtcars),
    "Model B" = lm(mpg ~ hp + cyl, data = mtcars)
)

results = lapply(names(models), function(m) {
    data.frame(
        model = m,
        term = names(coef(models[[m]])),
        estimate = coef(models[[m]]),
        setNames(data.frame(confint(models[[m]])), c("conf.low", "conf.high"))
    )
})
results = do.call(rbind, results)

tinyplot(estimate ~ term | model,
         ymin = conf.low, ymax = conf.high,
         data = results,
         type = "pointrange",
         dodge = TRUE,
         theme = "basic")
tinyplot_add(type = "ribbon")

Created on 2025-11-24 with reprex v2.1.1

@grantmcdermott grantmcdermott merged commit 41588b2 into main Nov 24, 2025
3 checks passed
@grantmcdermott grantmcdermott deleted the dodge_align_layers branch November 24, 2025 21:41
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.

dodge should accept logical Misalignment of dodged layers

2 participants