From: John B. <joh...@gm...> - 2010-01-11 11:28:29
|
I would just add that I got the plot to display by removing these lines from original program as well: graph1 = gdisplay() graph1.display.visible = 0 2010/1/11 John Brennan <joh...@gm...> > Okay I got it to work. That was my python programming error I getting used > to the language. For the record one needs place funct1 = gdots() BEFORE > entering the while loop and don't need to nest the for loop " for time in > arange(0., 30., 1.): " inside the while loop or even in the program at all. > > 2010/1/9 Bruce Sherwood <Bru...@nc...> > >> Thanks, Lenore, for answering John's question. A further simplification is >> that in the plot statement there's no need to specify >> "gdisplay=Xvel.display" because Xvelnodrag was created for and belongs to >> that gdisplay. >> >> >> Xvel = gdisplay(x=0,y=0, width=262, height=100, >> background=color.white, xmin=0, xmax=12, ymin=-vmax, ymax=vmax, title >> = 'V_x(t)') >> Xvelnodrag = gdots(size=3, color=nodragcolor) >> ...... >> Xvelnodrag.plot( gdisplay=Xvel.display, pos=(t,nodrag.velocity.x) ) >> >> John, if you're comfortable with the default gdisplay and gdisplay >> settings the minimal structure for making a graph is something like this: >> >> Xvelnodrag = gdots() # create a gdots object for graphics >> >> ........... >> Xvelnodrag.plot(pos=t,nodrag.velocity.x)) # add a dot to the gdots object >> >> Bruce Sherwood >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > |