Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boxplot median is incorrect #83

Open
dansbits opened this issue Aug 11, 2016 · 0 comments
Open

Boxplot median is incorrect #83

dansbits opened this issue Aug 11, 2016 · 0 comments

Comments

@dansbits
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant