Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

W. Watson wolf_tracks at invalid.com
Tue Sep 18 10:29:41 EDT 2007


I'm looking for an example with canvas that produces, say, a complete x-y 
plot of some data. By that I mean, it should do something like the following:

1. Produce x-y axes. The x-axis should be blue and the y-axis
    should be green
2. Put a label on each axis (vertical and horizontal text)
3. Plot some data (3 points is enough) and connect the points
    with a dashed line. Color one line red and the other green.
4. Position a title at some arbitrary place inside the x-y axes.
    That is, not just a title above and outside the top of the
    x-y area.

I just want to see how it's done. I'm not interested in a full-blown canned 
class or widget that does an x-y plot given some data. If not exactly the 
above, then something like it that gives me some idea of how to do such a 
graph. Maybe there's a tutorial that does something like this as an example.

-- 
                          Wayne Watson (Nevada City, CA)

                        Web Page: <speckledwithStars.net>



More information about the Python-list mailing list