Skip to content

Boxplot from one variable #453

@anhoej

Description

@anhoej

Thank you for an excellent package.

I’m struggling with boxplots. When I create a boxplot from a single variable, tinyplot uses sequence numbers on the x-axis. I would expect a boxplot to handle single-variable plots in the same way a histogram does.

library(tinyplot)

# Plot histogram
plt(Nile, type = 'histogram')

# Attemp to plot boxplot from one variable
plt(Nile, type = 'boxplot')

# Make dummy variable for x axis
x <- cut(seq_along(Nile), c(0, 28, 100))

# Plot boxplot from two variables - CORRECT!
plt(Nile ~ x, type = 'boxplot')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions