From: Bruce S. <Bru...@nc...> - 2012-11-10 02:45:06
|
Perhaps this is what you're looking for: from visual import * from visual.graph import * # From the VPython Help: # If you say g = gcurve(), g.gcurve is # a curve object used to represent the gcurve. # Every gdisplay has the attribute "display". d = gdisplay() g = gcurve() g.plot(pos=(2,1)) g.plot(pos=(5,3)) d.display.mouse.getclick() g.gcurve.pos = [(1,3), (4,1)] Bruce Sherwood On Fri, Nov 9, 2012 at 6:02 PM, Brian Stephanik <bri...@gm...> wrote: > I have a question on how to perfrom a specific task in VPython. I hope I'm > asking the right list. > > I'm trying to get the visual.graph module to be able to dynamically update a > curve. For example, I'd like to graph a function f(x) + c, where c is able > to be manipulated by the user, perhaps via a slider control. I can't seem to > get VPython to *change* a graph, only to draw new ones (it seems histograms > are able to do this, but not the other plot types?). And the gcurve object > doesn't seem to respond to setting .visible=False, thus allowing me to > create a new one and re-draw. > > Thanks for considering, > > Brian > > > Brian Stephanik > Graduate Student > Department of Physics > University of Washington > bs...@uw... |