from hep.aida import IAnalysisFactory
from java.util import Random
from jhplot import *
factory = IAnalysisFactory.create();
tree = factory.createTreeFactory().create();
hf = factory.createHistogramFactory(tree);
hf = factory.createHistogramFactory(tree);
h1 = hf.createHistogram1D("Histogram 1D",50,-3,3);
r = Random();
for i in range(100000) :
h1.fill(r.nextGaussian())
c1=HPlotter("Histogram")
c1.visible()
style=c1.getRegionStyle()
style.setParameter("backgroundColor","255,255,104");
style.setParameter("dataAreaColor","204,255,255");
style.setParameter("dataAreaBorderType","shadow");
style.dataStyle().setParameter("showHistogramBars","false");
style.dataStyle().setParameter("fillHistogramBars","false");
style.dataStyle().setParameter("showDataPoints","true");
style.dataStyle().markerStyle().setShape("circle");
c1.draw(h1,style)
c1.export("ss.png")