//@code objref vec, g1, g2, hist vec = new Vector(1000) g1 = new Graph() g2 = new Graph() g1.size(0, 1000, 0, 1) g2.size(0, 1, 0, 150) highindex = 1 lowindex = mcell_ran4_init() proc doit() {local i g1.erase() g2.erase() for i=0, vec.size-1 { vec.x[i] = mcell_ran4(&highindex) } hist = vec.histogram(0, 1, 0.1) vec.line(g1) hist.line(g2, .1) g1.flush g2.flush } variable_domain(&highindex, 0, 2^32-1) xpanel("mcell_ran4 test") xbutton("Sample", "doit()") xpvalue("highindex", &highindex, 1, "doit()") xpvalue("lowindex", &lowindex, 1, "mcell_ran4_init(lowindex) doit()") xpanel() doit()