Skip to content

Boxplot median is incorrect #83

@dansbits

Description

@dansbits

If I run the following example code the box plot is not correct.

plot = Nyaplot::Plot.new

data = [24, 24, 0, 24, 16, 28, 0, 16, 4, 0, 4, -8, -36, -4, 32, 40, -4, -20]

# calling data.median gives a value of 4, which is the correct median
p data.median # => 4

plot.add :box, data
plot.show

The plot below is what I get from plot.show. It shows that the median is 10:
fig 1

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