[Tutor] pixel plotting

Alan Trautman ATrautman@perryjudds.com
Wed, 14 Aug 2002 10:32:59 -0500


More from me. I've played around a little more. Here is a simple example of
what can be done to plot dots.

Program:

from visual.graph import * # import graphing features

a = [1,3,2,5,3,6,7,4,2,1,3,4,5,6]
x = 1.72

funct1 = gdots(color=color.yellow) # a collection of plotted dots

for each in a: # x goes from 0 to 8
    funct1.plot(pos=(cos(each),each)) # plot

You will first need to get vpython from www.vpython.org and check out their
tutorial everything worked as cut and paste. This is copied heavily from the
graph.py main test() function. I unfortunately cannot verify functionality
on anything but a Mac and Win 98/NT since I'm at work.

Peace
Alan


-----Original Message-----
From: Alan Trautman 
Sent: Wednesday, August 14, 2002 9:10 AM
To: 'tutor@python.org'
Subject: RE: [Tutor] pixel plotting


Hi all,

vpython is actually quite impressive as a total project if you have plotting
needs. I have just went through several of there packages and it looks like
quite mature code at least for what little I have looked at. To specifically
document dot attributes they are constants in in the graph.py library at the
top of the file. They are well documented and not hard to change to suit
different needs or a function could easily be added to set them. The code is
quite easy to read in this module (no GUI bits they are hidden in another
library) and could be modified easily. 

They do require the use of Open GL but that is becoming quite common so it
should be useful.

Peace
Alan

-----Original Message-----
From: lumbricus@gmx.net [mailto:lumbricus@gmx.net]
Sent: Wednesday, August 14, 2002 7:56 AM
To: tutor@python.org
Subject: Re: [Tutor] pixel plotting


Hello!

Since nobody seems to know:

> The vpython library has wonderful plotting routines.  One of them is
> gdots. 
>  Gdots plots points on a graph.  Although one can control the color of the
> 
> dots, one apparently cannot control the size of the dots.
> 
> Suppose I wanted to write  Python program to create the Mandelbrot set, 
> which has hundreds of thousands of dots.  One needs to plot individual 
> pixels.
> 
> Here are my two questions then:
> 
> Is there a formal description of the various vpython routines?  There is a
> 
> wonderful tutor, but no formal description with list all the attributes 
> ascribable to gdots.

If there is none and you find out how it works, write one
and make it available to the public. Thats how OSS works.
This module sounds interesting.
 
> If gdots can't be made to plot individuals at a given (x,y) point, is
> there 
> some other way to do it?

?
 
> Thanks
> 
> Laney Mills

Sorry, J"o!

-- 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor