# How to group the labels in BarChart?

Posted 3 months ago
711 Views
|
3 Replies
|
1 Total Likes
|
 I want to generate the following bar chart, and I need to group the labels. How should it be done? data = {{RandomInteger[{0, 100}, 100],RandomInteger[{0, 100}, 100], RandomInteger[{0, 100}, 100]}, {RandomInteger[{0, 100}, 100], RandomInteger[{0, 100}, 100]}}; BoxWhiskerChart[data, ChartLabels -> {{"Group1", "Group2"}, {"a", "b", "c", "d", "e"}}] 
3 Replies
Sort By:
Posted 3 months ago
 Hi Ming-Chou,I have run into this issue before. Here is a workaround using a custom LabelingFunction, but it does not quite match your requirements. labels = {{"Group1", "Group2"}, {{"a", "b", "c"}, {"d", "e"}}} BoxWhiskerChart[data, ChartLabels -> {First@labels, None}, LabelingFunction -> (Placed[labels[[2]][[##]] & @@ #2, Below] &)] 
Posted 3 months ago
 Hi Rohit Namjoshi: I did ask this question repeatedly in two forums! When I have a problem I can't solve, I always look for a similar paradigm in both forms ~~ Because this problem has been bothering me for a long time! Sorry if I cause people any trouble~~Thank you for giving me this idea~~It is very important to me~~
Posted 3 months ago
 Crossposted here.