I think I'm starting to understand, but again, it would really be much easier if you showed us a picture or gave us the code that almost works so we don't have to keep guessing at how to interpret your words. I know you think you're being clear and that you're amazed that we don't understand, but that's just how it is: we don't understand. You can berate us or you can give us what we're asking for so that you can get your problem solved.
Anyway, what I think I now understand is that you have two problems. You need to "flatten" a data structure in a particular way so that it can be input into BarChart
, and you need to put several bar charts into a row. The latter problem is trivial: just use Map
along with whatever row/grid structure you want. The first problem is ambiguous, because you haven't given us enough information. Let me demonstrate explicitly.
Here's the sample data you gave us:
nl = {{2, 3}, {{4, 5}, {6, 7}, {9, 8}}, {{{8, 4}, {6, 9}}, {{3, 5}, {5, 2}, {7, 8}}}};
There are two ways to "flatten" this so that each element of nl
can be a bar chart:
nl1 = {{2, 3}, {{4, 5}, {6, 7}, {9, 8}}, {{8, 4}, {6, 9}}, {{3, 5}, {5, 2}, {7, 8}}};
nl2 = {{2, 3}, {{4, 5}, {6, 7}, {9, 8}}, {{8, 4}, {6, 9}, {3, 5}, {5, 2}, {7, 8}}};
Which is the one you want?
As for the second problem, I'll assume you want GraphicsRow
:
GraphicsRow[BarChart /@ nl1]
Both BarChart
and GraphicsRow
have options that you can play with to get the display just the way you want. As it stands, the tick labels are obscured, but you can fix that. Or use plain Row
instead. Or you can add a layer of List
and use Grid
or GraphicsGrid
.
Grid[{BarChart /@ nl1}]