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

Extra pointrange and errorbar support #40

Merged
merged 5 commits into from
Jun 25, 2023
Merged

Conversation

grantmcdermott
Copy link
Owner

@grantmcdermott grantmcdermott commented Jun 20, 2023

Closes #38. Also closes #39.

Examples:

library(plot2)
par(pch = 19)

mod = lm(mpg ~ hp + factor(cyl), mtcars)
coefs = data.frame(names(coef(mod)), coef(mod), confint(mod))
coefs = setNames(coefs, c("x", "y", "ymin", "ymax"))

with(
  coefs,
  plot2(
    x = x,
    y = y,
    ymin = ymin,
    ymax = ymax,
    type = "pointrange"
  )
)

with(
  coefs,
  plot2(
    x = x,
    y = y,
    ymin = ymin,
    ymax = ymax,
    type = "errorbar"
  )
)

Created on 2023-06-19 with reprex v2.0.2

@grantmcdermott
Copy link
Owner Author

I know everyone is busy with impending travels etc. and I'm pretty confident that this PR is good to go. So I'm happy to merge this as is, but please feel free to ping if you spot something problematic.

@grantmcdermott grantmcdermott merged commit e6deefa into main Jun 25, 2023
5 checks passed
@grantmcdermott grantmcdermott deleted the pointrange-xaxis branch June 25, 2023 23:01
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.

Support type = "errorbar" Support pointrange character / factor x-axis
1 participant