I am wondering how to describe the reasoning behind the None setting in ChartLabels
to label a group of data. It's a very common way of using a bar chart but it wasn't immediately obvious from the help menu - I had to figure it out from other BarChart
questions (very common).
I like in Mathematica that I can describe what I want and then translate that to the functions and settings (with some practice and vocab) - I can't figure out how to do it for this though.
The help menu says "None indicates no label. If there are more elements in a dataset than Subscript[lbl, i] specified, the subsequent Subscript[lbl, i] are taken to be None".
The default behaviour is to label each data point in the group with as many labels as needed or as many as you have - this is how I interpret the help description.
My question is: how would I have figured out that ChartLabels->{blah, None}
would generate labels for each group of data? I hate memorising 'tricks' - is there an obvious way to describe this behaviour that makes adding None obvious?
{BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> Range[3]],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[2]}],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[2], None}],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[10], None}] (* at least 3 but mma ignores >3 *)}