[Q] 2D graphic routines and data sets in 2D lists
- To: mathgroup at smc.vnet.net
- Subject: [mg18374] [Q] 2D graphic routines and data sets in 2D lists
- From: Dan Truong <dtruong at irisa.fr>
- Date: Wed, 30 Jun 1999 14:13:34 -0400
- Organization: IRISA, FRANCE
- Sender: owner-wri-mathgroup at wolfram.com
This is an annoyance I've met with many (not all)
List* graphic routines : data sets cannot be encompassed
in a single list. I propose a fix, but I'd like to
know if someone has something cleaner.
Here's an example:
It's specified that PercentileBarChart[] uses
1D lists. So this works:
x = PercentileBarChart[
{1,2,3}, {2,3,4}
]
but this won't:
x = PercentileBarChart[
{ {1,2,3}, {2,3,4} }
]
When data is built elsewhere, this is an annoyance, ie:
Foo = { {1,2,3}, {2,3,4} };
PercentileBarChart[Foo];
One can write the following, but it's not automatable,
because it's impossible to dynamically build expressions
with commas (if someone know how to I'm very interrested):
PercentileBarChart[ Foo[[1]], Foo[[2]] ];
The solution is to flatten out the outermost list to remove
it, but it is impossible directly on Foo. My solution is to
tweak the procedure call after its built:
Flatten[PercentileBarChart[Foo],1,List];
It works, but it's ugly, esp. if the graphic routine
is complex (ie many optional paramters set, etc.), Furthermore
it's quite akward to code generic routines like that.
Is there a nicer/cleaner fix than that ? If not, maybe
Wolfram people should do something about this in future
releases of the toolboxes... :( More so that the { {}, {} }
are not interpreted therefore do not conflict with any
other declaration formats.