Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

[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.


  • Prev by Date: RE: Can we plot graphs over really small intervals?
  • Next by Date: Re: Livegraphics3D
  • Previous by thread: Help: EPS file generation bug for BarChart[]
  • Next by thread: HOW BEST: Mathematica figs -> Textures on Mac -> PDF