[Tutor] plotting graphs

James Mithen jamesmithen at googlemail.com
Sun Jul 27 18:30:29 CEST 2008


I'd personally recommend the matplotlib plotting library.  It has a
matlab style plotting interface.  The only work required by you would
be to write a few one line functions that wrap the
matpotlib.pylab.plot() function call.  Your students on windows could
use idle as a back end (you have to have idle in interactive plotting
mode for it to work, but that is fine unless you are doing some pretty
heavy graphing).

James M


> On Sun, Jul 27, 2008 at 8:40 AM, Peter Petto <ppetto at apk.net> wrote:
>> I'm about to try some Python programming for drawing simple geometric
>> pictures (for math classes I teach) and was hoping to get some advice that
>> will send me off in the best direction.
>>
>> I want to write programs that can draw figures with commands akin to
>> point(x,y) to draw a point at coordinates (x,y), or segment (x1,y1,x2, y2)
>> to draw a segment between points (x1, y1) and (x2, y2)?
>>
>> I'd appreciate recommendations as to the best facility or library to use to
>> this end. I primarily use a Mac, but my students primarily use Windows.
>>
>> I'd love to hear any and all pointers or comments. Thanks!
>> --
>> ===
>> Peter Petto <ppetto at apk.net>
>> Bay Village, OH   tel: 440.249.4289
>>
>
> Hello Mr. Petto,
>
> I'd recommend the PyGame library. PyGame is a Python wrapper around the
> extraordinary SDL library. For an example program of what you might be looking
> for, take a look at:
>
> http://www.cs.iupui.edu/~aharris/pygame/ch05/paint.py
>
> The whole site has a lot of Python/PyGame examples:
> http://www.cs.iupui.edu/~aharris/pygame/
>
> Andy Harris is a CS professor at Indiana University-Perdue University
> Indianapolis,
> and is the author of several books, including Game Programming
> [ISBN-13: 978-0-470-06822-9], which is a fairly complete introduction
> and tutorial
> for PyGame.
>
> Happy Programming!
> --
> b h a a l u u at g m a i l dot c o m
> Kid on Bus: What are you gonna do today, Napoleon?
> Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!
>
>
> ------------------------------
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
> End of Tutor Digest, Vol 53, Issue 95
> *************************************
>


More information about the Tutor mailing list