Orientation of boxes and bars
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
the orientation of boxes in a box plot and bars in bar plots and histogram
A plot of type
plot::Boxplot serves for visualizing
and comparing statistical data samples. The plot reduces the data
to few simple descriptive parameters.
One coordinate direction provides information on the statistical data (25% quantile, median, 75% quantile etc.). The other coordinate direction just serves for placing several boxes associated with different data samples side by side for comparison.
the vertical direction provides the information on the statistical
the boxes are turned by 90 degrees. Now, the horizontal direction
provides the information on the statistical data.
We create a box plot:
data1 := [2, 6, 4, 3, 1, 7, 9, 5, 3]: data2 := [2, 4, 8, 8, 7, 6, 8, 7, 3, 1, 10]: data3 := [stats::normalRandom(6, 2)() $ k = 1 .. 100]: plot(plot::Boxplot(data1, data2, data3, Notched = TRUE)):
The boxes are rendered horizontally:
plot(plot::Boxplot(data1, data2, data3, Notched = TRUE, DrawMode = Horizontal)):
delete data1, data2, data3: