Skip to content

Feature request: simple geom_boxplot  #2303

@ptoche

Description

@ptoche

I introduced a simple boxplot to students today and had to restrict myself to plain R boxplots, because the ggplot2 syntax I know is IMHO too roundabout.

The simplest boxplot appears to be something like this:

x = 1:15
df <- data.frame(x = x)
 ggplot(data = df, aes(x = factor(""), y = x)) +
 geom_boxplot() + 
 theme_minimal() + xlab(NULL)  #  simplify

By contrast, a decent boxplot in plain R can be obtained with:

boxplot(x)

Questions:

1. Is there a simple way to obtain a simple geom_boxplot()?
2. May I suggest adding a "minimal boxplot" feature, if it is not currently available?

Perhaps analogous to qplot something like qboxplot that would have the following syntax

qboxplot(x, data = df)

Or allowing to set aes(x=x) without having to set an x value, and automagically removing the unwanted theme elements, e.g.:

ggplot(data = df, aes(y = x)) + geom_boxplot(stat = "identityx")

(I know stat="identity" is already in use, so not sure if it can be recycled easily like that)

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