multiple curves on single vPython plot -


i put 2 curves on 1 vpython plot. possible?

i opening curve with:

gd = gdisplay(x=300, y=0, width=600, height=600,   title='entropy', xtitle='time', ytitle='n',   foreground=color.black, background=color.red,   xmax=250, xmin=0, ymax=400, ymin=0.) funct1=gcurve(color=color.white) 

i updating single curve inside while loop

funct1.plot(pos=(bigindex,entropy)) 

along plotting entropy on graph, i'd plot number of particles in particular position. 1 set of axis, 2 curves. each curve undated inside loop students can see 1 curve grow other decreases.

is possible?

simply create gcurve object. update both curves simultanously in while loop using plot command. example:

from visual import * visual.graph import * gd = gdisplay(x=300, y=0, width=600, height=600,   title='entropy', xtitle='time', ytitle='n',   foreground=color.black, background=color.white,   xmax=250, xmin=0, ymax=400, ymin=0.) funct1=gcurve(color=color.black) funct2=gcurve(color=color.black)  in range(0,200):   funct1.plot(pos=(i,i*2))   funct2.plot(pos=(i,400-i*2))   rate(20) 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -