Skip to content

Barplot & error bar #1

@devSJR

Description

@devSJR

The latest version of tinyplot integrated barplots. Is there a plan to add an option for error bars?

With a little more effort, this could work manually.

mod = lm(mpg ~ wt * factor(am), mtcars)
coefs = data.frame(names(coef(mod)), coef(mod), confint(mod))
colnames(coefs) = c("term", "est", "lwr", "upr")

op = tpar(pch = 19)

with(
coefs,
{
tinyplot(est ~ term, ymin = lwr, ymax = upr, type = "errorbar")
tinyplot(est ~ term, type = "barplot", beside = TRUE, add = TRUE)
}
)

If not, no problem. There are many reasons not to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions