Skip to content

jbryer/ggBoxes

Repository files navigation

ggBoxes: Two Dimensional Box and Error Plots

To install the development version of the package, use the remotes package:

remotes::install_github('jbryer/ggBoxes')

Two Dimensional Box and Whisker Plots

Basic example using the mtcars dataset.

library(ggBoxes)
data(mtcars)
ggplot(mtcars, aes(x = wt, y = mpg, group = factor(cyl),
                   color = factor(cyl), fill = factor(cyl))) +
    geom_boxplot2d() +
    theme(legend.position = 'bottom') +
    ggtitle('Two Dimensional Box Plot')

Two Dimensional Confidence Intervals (Error Boxes)

p <- ggplot(mtcars, aes(x = wt, y = mpg, group = factor(cyl),
                   color = factor(cyl), fill = factor(cyl))) +
    geom_errorbox2d() +
    theme(legend.position = 'bottom') +
    ggtitle('Two Dimensional Confidence Interval Plot', 
            subtitle = 'p = 0.10, p = 0.05, and p = 0.01')
ggExtra::ggMarginal(p + geom_point(alpha = 0), 
                    type = 'density', 
                    groupColour = TRUE, 
                    groupFill = TRUE)

About

Two Dimensional Box and Whisker Plots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages