Re: Uniform scaling with gdisplay
"Poul Riis" <Poul.Riis-pIBpe43/vk1knbxzx/[email protected]> Sun, 14 Oct 2012 20:32:16 +0200
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <[email protected]> |
Even worse now:
Running the program below now results in the following error message:
Traceback (most recent call last):
File "C:\pr\python\spiral.py", line 11
spiralplot =
visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph)
File "C:\Python32\lib\site-packages\vis\primitives.py", line 82, in
__init__
if not _other: self.init_defaults(keywords)
File "C:\Python32\lib\site-packages\vis\primitives.py", line 175, in
init_defaults
self.material = self.display.material
AttributeError: 'gdisplay' object has no attribute 'material'
import visual.graph as visualgraph
from time import *
from math import *
spiralgraph=visualgraph.gdisplay(title='Spiral', ytitle='x', xtitle='y',
x=0, y=0,
width=800, height=800,
foreground=visualgraph.color.black,
background=visualgraph.color.white)
spiralplot =
visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph)
spiralplot.plot(pos=(-15,-15))
spiralplot.plot(pos=(15,-15))
spiralplot.plot(pos=(15,15))
spiralplot.plot(pos=(-15,15))
spiralplot.plot(pos=(-15,-15))
for i in range(0,3600):
t=pi*i/360
x=t*cos(t)
y=t*sin(t)
spiralplot.plot(pos=(x,y))
sleep(0.001)
Poul Riis
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users