ObjectProfile / Roassal3

The Roassal Visualization Engine
MIT License
97 stars 52 forks source link

Boxplot notch #573

Closed DurieuxPol closed 1 year ago

DurieuxPol commented 1 year ago

Improved RSBoxplot by adding the possibility to notch the boxplot, that is to say to represent the confidence interval around the median by narrowing the box. The default percentage for the confidence interval is 95%, but it can be changed to 90% or 99%. Also added tests for it.

Here is an example:

| y p1 p2 c size |

y :=  { 
{  1. 2. 3. 4. 5. 6. 7. 1. 2. 3. 4. 5. 6. 7. 1. 2. 3. 4. 5. 6. 7. 1. 2. 3. 4. 5. 6. 7. 1. 2. 3. 4. 5. 6. 7. }.
{ 1. 2. 3. 4. 5. 6. 7.  } }.

size := 50.

c := RSCompositeChart new.
p1 := RSBoxPlot new.
p1 y: y.
p1 notch: true.
p1 barSize: size.
p1 barOffset: size * -0.55.
p2 := RSBoxPlot new y: y.
p2 barSize: size.
p2 barOffset: size * 0.55.
c add: p1; add: p2.
c open

image