MathGroup Archive 1996

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

Search the Archive

Re: supplying an arbitrary number of lists to functions


In article <4l792h$1ov at ralph.vnet.net>,
Dirk Kautz  <kautz at tyto.bio2.rwth-aachen.de> wrote:

>data = {{a,b},{c,d},...}},
>
>In my special case, I want to do:
>
>MultipleListPlot[{a,b},{c,d},...]
>
>Of course, if the list is not too long, I can always do
>MultipleListPlot[data[[1]],data[[2]],...],
>
>but what in the general case?

If you want one plot for each list, use the following:

In[45]:=
multipleListPlot[x___List] := Module[
	{list1 = {x}},
	ListPlot[#]& /@ list1
]

If you want all your lists plotted on the same plot, use
the following:

In[56]:=
combinedListPlot[x___List] := Module[
	{list1 = {x}},
	multiplePlots = {
		ListPlot[#, DisplayFunction -> Identity]& /@ list1
	};
	Show[multiplePlots, DisplayFunction -> $DisplayFunction]
]

-- 
Bob Hall            | "Know thyself? Absurd direction!
rhall2 at gl.umbc.edu  |  Bubbles bear no introspection."  -Khushhal Khan Khatak

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Student version of Mathematica and Mathlink
  • Next by Date: ???? How to assign result from Solve to variable ????
  • Previous by thread: 1996 Undergraduate Computational Science Education Awards
  • Next by thread: Re: supplying an arbitrary number of lists to functions