#vpython installation is necessary from visual import graph,color # import graphing features from visual module from numpy import pi,sin,cos,exp,arange #import functions from numpy funct1 = graph.gcurve(color=color.red) #connected curve with red funct2 = graph.gvbars(delta=0.05,color=color.blue) #vertical bars with blue #delta specifies the width of the bar funct3 = graph.gdots(color=color.green) #disconnected dots with green rad = arange(0.0, 2.0*pi, pi/32.0) #arange(start,stop,step) for i in rad: #for loop in rad funct1.plot(pos=(i, sin(i))) funct2.plot(pos=(i, cos(i))) funct3.plot(pos=(i, exp(-i)))