Plotting, new and confused

0 views
Skip to first unread message

TheresaP

unread,
Feb 4, 2008, 7:30:53 PM2/4/08
to sage-newbie
I want to do something pretty simple but I am struggling as a newbie.
I have an array that looks like this:

X Y Value (I)
0.00 -1.00 10795
-0.50 -0.87 6418
-0.87 -0.50 4808
-1.00 0.00 5719
-0.87 0.50 7448
-0.50 0.87 8290
0.00 1.00 7134
0.50 0.87 7008
0.87 0.50 5885
1.00 0.00 8304
etc.....

I want a 2D plot where the value is color coded (so between 0-2000 is
one color, 2000-4000 another, etc)

All the plotting examples I see are functions. How do I plot a data
set?

William Stein

unread,
Feb 4, 2008, 7:46:35 PM2/4/08
to sage-...@googlegroups.com
Use the point command, e.g.,

sage: r = random
sage: sum([point((r(), r()), rgbcolor=(r(),r(),r())) for _ in range(100)])

to draw 100 randomly colored points.

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Ted Kosan

unread,
Feb 4, 2008, 7:54:04 PM2/4/08
to sage-...@googlegroups.com
TheresaP wrote:

The Newbies book has some examples of plotting lists of values:

http://sage.math.washington.edu/home/tkosan/newbies_book/

Ted

Reply all
Reply to author
Forward
0 new messages