Re: ListPlot?
- To: mathgroup@smc.vnet.net
- Subject: [mg12603] Re: ListPlot?
- From: "Richard L. Bowman" <rbowman@bridgewater.edu>
- Date: Mon, 25 May 1998 14:25:13 -0400
- Organization: Bridgewater College
- References: <6k7cr9$1bi@smc.vnet.net>
On 23 May 1998, phpcp wrote: > How can I plot one list against another > > Sanjay. One way, but maybe not the most elegant, is to combine the two lists into one and plot that list. In[1]:= list1 = {1, 2, 3, 4} Out[1]= {1, 2, 3, 4} In[2]:= list2 = {a, b, c, d} Out[2]= {a, b, c, d} In[3]:= newlist = Transpose[{list1,list2}] Out[3]= {{1, a}, {2, b}, {3, c}, {4, d}} Now ListPlot this newlist. ------------------------------------------------------------------------- Dr. Richard L. Bowman Chair, Dept. of Physics e-mail: rbowman@bridgewater.edu (and Dir. of Academic Computing) phone: 540-828-5441 Bridgewater College FAX: 540-828-5479 Bridgewater, VA 22812 http://www.bridgewater.edu/~rbowman/ -------------------------------------------------------------------------