Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

RE: Headless set of elements?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32581] RE: [mg32557] Headless set of elements?
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Wed, 30 Jan 2002 03:18:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

> -----Original Message-----
> From: JT Shen [mailto:jushen1 at hotmail.com]
To: mathgroup at smc.vnet.net
> Sent: Saturday, January 26, 2002 10:09 AM
> Subject: [mg32581] [mg32557] Headless set of elements? 
> 
> 
> 
> Hi, I'd like to ask for help on the function of MultipleListPlot.
> 
> I am trying to use MultipleListPlot, and my dataset looks like
> 
> {list1, list2, list3, list4, ..., listn}, where the number of 
> lists can 
> vary. However, the syntax of MultipleListPlot is as
> MultipleListPlot[list1, list2, list3, ..., listn]. In this 
> case, what would 
> be the most efficient way to achieve this (instead of cut and 
> past each list 
> by hand)?
> 
> Thanks for your help.
> 
> JT
> 
 
<< "Graphics`MultipleListPlot`"

...is quite tolerant with its input.

l1 = Table[{x, Sin[Pi*x]}, {x, 0, 1, 0.1}]; 
l2 = Table[{x, Cos[Pi*x]}, {x, 0.05, 1, 0.1}]; 
ll = {l1, l2}; 

MultipleListPlot[l1, l2, PlotJoined -> True]
MultipleListPlot[{l1, l2}, PlotJoined -> True]

Both formats work! As MultipleListPlot evaluates its 
arguments (in contrast to Plot)...

Attributes[MultipleListPlot]
{}

...this implies, both will work:

MultipleListPlot[ll, PlotJoined -> True]
MultipleListPlot[Sequence @@ ll, PlotJoined -> True]

and also something like this:

MultipleListPlot[{Reverse /@ l1, l2}, 
  PlotJoined -> True, AspectRatio -> 1]

--
Hartmut Wolf



  • Prev by Date: RE: ReplaceAll doesn't replace
  • Next by Date: Re: File Import
  • Previous by thread: Re: Headless set of elements?
  • Next by thread: RE: Headless set of elements?