from hep.aida import IAnalysisFactory
from java.util import Random
from hep.aida.ref.histogram import *
from jhplot import *
r = Random()
cl1D =Cloud1D( );
cl2D =Cloud2D( );
af = IAnalysisFactory.create();
tree = af.createTreeFactory().create();
hf = af.createHistogramFactory(tree);
r = Random()
cl1D = hf.createCloud1D( "cl1D", "1-Dimensional Cloud", 1500, "" )
cl2D = hf.createCloud2D( "cl2D", "2-Dimensional Cloud", 1500, "" )
for i in range(2000):
xval = r.nextGaussian();
yval = r.nextGaussian();
w = r.nextDouble();
cl1D.fill( xval, w );
cl2D.fill( xval, yval, w );
c1=HPlotter("Cloud",800,600,2,1)
c1.visible()
c1.cd(1,1)
c1.draw(cl1D)
c1.cd(2,1)
c1.draw(cl2D)
# c1.export("a.eps")
Ads help maintain this website.