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

Automatic ribbon order #54

Merged
merged 4 commits into from
Aug 8, 2023
Merged

Automatic ribbon order #54

merged 4 commits into from
Aug 8, 2023

Conversation

grantmcdermott
Copy link
Owner

Fixes #53 .

devtools::load_all("~/Documents/Projects/plot2")
#> ℹ Loading plot2

mod = lm(mpg ~ wt, mtcars)
pred = predict(mod, interval = "confidence")

mtcars2 = cbind(mtcars, pred)

with(
  mtcars2,
  plot2(
    x = wt, y = fit,
    ymin = lwr, ymax = upr,
    type = "ribbon"
  )
)

This PR also allows interval plot types (ribbon, pointrange, etc) to be specified without a yvar.

with(
  mtcars2,
  plot2(
    x = wt, 
    ymin = lwr, ymax = upr,
    type = "ribbon"
  )
)

@grantmcdermott grantmcdermott merged commit 7baaae2 into main Aug 8, 2023
5 checks passed
@grantmcdermott grantmcdermott deleted the ribbon-order branch January 18, 2024 19:49
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.

Should ribbons be (x-axis) ordered automatically?
1 participant