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:
If I run the following example code the box plot is not correct.
The plot below is what I get from plot.show. It shows that the median is 10: