Re: Uniform scaling with gdisplay
Bruce Sherwood <[email protected]> Sun, 14 Oct 2012 14:12:10 -0600
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <CAFDG03jHuLvsjxLCpYFzXTqDc-cR-mxTHY057XwS_QNZiwWhOw@mail.gmail.com> |
What did you change? That is, what do you mean by "now"? Presumably you didn't get such a very strange message before making some change. Maybe you need to reinstall visual? Bruce Sherwood On Sun, Oct 14, 2012 at 12:32 PM, Poul Riis <Poul.Riis-pIBpe43/vk1knbxzx/[email protected]> wrote: > 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