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] ====