Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'ListPlot of x and y lists' topicStudent Support Forum > General > "ListPlot of x and y lists"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda ben-shimol
09/29/09 09:16am

ListPlot is expecting a list of y values or a list of pairs. In each pair the first element is the x value and the second is the y value (using your terms)

To generate a list of pairs from tow lists of identical length you need to use Transpose or Thread

assume that xval is the vector (list) of x values and similarly for yval


ListPlot[Transpose[{xval,yval}]
or replace Transpose with Thread

yehuda

URL: ,

Subject (listing for 'ListPlot of x and y lists')
Author Date Posted
ListPlot of x and y lists Jarod 09/24/09 6:20pm
Re: ListPlot of x and y lists yehuda ben-s... 09/29/09 09:16am
Re: ListPlot of x and y lists Bill 09/29/09 09:21am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic