I have two collections of data: xdata
and ydata
xdata = { {"A", {1, 2, 5}}, {"B", {5, 7, 2, 2, 5}}, {"C", {3, 2, 5, 7}}};
ydata = { {"A", {7, 2}}, {"B", {7, 2, 5}}, {"C", {6, 7, 3}}};
Using BoxWhiskerChart
, I can show xdata
or ydata
alone:
BoxWhiskerChart[xdata,
{{"Whiskers", Dashed}, {"Outliers", None}, {"MedianMarker", 1, Directive[Thick, White]}},
PlotRange -> Automatic, ChartStyle -> 56, ImageSize -> Medium]
Now I want to group the data according to their labels (i.e., A
, B
, and C
).
The resulting figure (with the same faked data) is like this (in Python) @ stackoverflow:
Thus, my question is:
How to group box-and-whisker in parallel for comparison in BoxWhiskerChart?
In particular, how to show the labels (
A
,B
, andC
) inx-axis
and how to draw the legends (xdata
andydata
)?