From: Bruce S. <bas...@nc...> - 2010-09-28 16:47:09
|
Here is an example: from visual.graph import * g = gdisplay() c = gcurve(color=color.cyan) c.plot(pos=(1,0)) c.plot(pos=(2,1)) print c.gcurve.pos # undocumented gcurve attribute; c.gcurve is a curve object for y in arange(1,0.1,-.01): rate(40) c.gcurve.pos[1] = (2,y,0) g.display.mouse.getclick() c.gcurve.visible = False Also note the following from the documentation on graphs: Every gdisplay has the attribute "display", so you can place additional labels or manipulate the graphing window. The only objects that you can place in the graphing window are labels, curves, faces, and points. graph1 = gdisplay() label(display=graph1.display, pos=(3,2), text="P") graph1.display.visible = False # make the display invisible You can zoom in a graph (use left+right mouse buttons), just as in any VPython display. You can't rotate, because it's a 2D display. Finally, note that visual.graph is written in pure Python, so if you have special needs you might consider making an improved version. Bruce Sherwood On Tue, Sep 28, 2010 at 6:05 AM, Воробьев Владимир <Azi...@ya...> wrote: > Hello! > Could somebody tell about two things - movement in (2D)3D and enabling visibility in gdisplay? > I need some more flexibility with 2D-graph: > I want to zoom and move some interesting details in my (2D)3D graph. Is it possible? > The other thing I want to know: > Does visibility work with objects graphed on gdisplay? > Thank in advance. > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |