Steve Yarbro wrote:
> 
> 
> On Sun, Jan 11, 2009 at 4:13 PM, mabshoff <> wrote:
> 
> 
>     Hi Michael:
> 
> 
> Thanks for the help.  The error is very likely my lack of skill with 
> sage (an excellent piece of work BTW).  I have put together an example 
> as you suggested.  The support for sage is very good.  Thank you.  The 
> example URL is  http://sagenb.org:8000/home/pub/148/.   When I use the 
> zip(), the list_plot works.
> 


Yes, you need to use zip in your case.  list_plot takes a list of 
points, like this:

list_plot([ (x1,y1), (x2,y2), (x3,y3)])

You were trying to pass it two lists, one of x coordinates and one of y 
coordinates.  This is how you would do things in matlab, but not Sage:

list_plot([x1, x2, x3], [y1, y2, y3])

The zip command just converts between these:

zip([x1,x2,x3], [y1,y2,y3]) is [(x1,y1), (x2,y2), (x3,y3)]


You can see the documentation for list_plot and zip by typing the 
command name followed by a question mark:

list_plot?

zip?


Having said that, this confusion points to a bug in the list_plot 
documentation.  It should probably mention this and show how to use the 
zip command.

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to