Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

Re: supplying an arbitrary number of lists to functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3812] Re: supplying an arbitrary number of lists to functions
  • From: rhall2 at umbc.edu (hall robert)
  • Date: Sat, 27 Apr 1996 00:56:22 -0400
  • Organization: University of Maryland, Baltimore County
  • Sender: owner-wri-mathgroup at wolfram.com

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