Question

I want to display a 10x48 dataset (10 sampling points with 48 or more samples each) in a box plot using MathGL. The result should be 10 box plots that summarize the data for each sampling point. The problem I'm having is, I can't figure out what data format the boxplot function from MathGL needs. In the documentation it says that for each entry, 5 values are provided (Minimum, Q1, Q2/Median, Q3, Maximum), yet when I structure the mvlData like such:

mglData(10x5) =
{
  Min_1,  Q1_1,  Q2_1,  Q3_1,  Max_1,
  Min_2,  Q1_2,  Q2_2,  Q3_2,  Max_2,
  Min_3,  Q1_3,  Q2_3,  Q3_3,  Max_3,
  ...
  Min_10, Q1_10, Q2_10, Q3_10, Max_10
}

I do not get the correct outputs. If I'd structure it with data like such:

mglData(10x48) =
{
  Data_1_1,  Data_1_2,  Data_1_3,  ... , Data_1_48,
  Data_2_1,  Data_2_2,  Data_2_3,  ... , Data_2_48,
  Data_3_1,  Data_3_2,  Data_3_3,  ... , Data_3_48,
  ...
  Data_10_1, Data_10_2, Data_10_3, ... , Data_10_48
}

it outputs nice boxplots, but with the wrong values. The example show that the mglData needs to contain Nx7 values, hence in my case 10x7? but I can only see 5 possible values (not 7) or is there more than Minimum, Q1, Q2/Median, Q3, Maximum to a boxplot?

Any help is very appreciated.

Thanks

Max

No correct solution

OTHER TIPS

First variant with transposed dimensions is correct one. You can create an array 10*5 directly (10 points in x-direction) or transpose the current one by function mglData::Transpose().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top