from java.util import Random
from java.awt import *
from jhplot import *
c1 = HPlot("Test")
c1.visible()
c1.setRange(-2,2,-2,2)
c1.setNameX('Time')
c1.setNameY('Data')
c1.setLegend(0)
r = Random()
import time
p=P1D("test")
p.setColor(Color.red)
p.setSymbolSize(10)
for i in range(100):
c1.clearData()
p.clear()
x=r.nextGaussian()
y=r.nextGaussian()
p.add(x,y)
c1.draw(p)
time.sleep(0.01)
Ads help maintain this website.