from hep.aida import *
from java.util import Random

factory = IAnalysisFactory.create();
tree = factory.createTreeFactory().create();
hf = factory.createHistogramFactory(tree);

hf = factory.createHistogramFactory(tree);
h1 = hf.createHistogram1D("Histogram 1D",50,-3,3);

plotter = factory.createPlotterFactory().create("Style1D.py Plot");
plotter.region(0).plot(h1);
plotter.show();

style = plotter.region(0).style();

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");


r = Random();
for i in range(100000) :
	h1.fill(r.nextGaussian());
# jHepWork @S.Chekanov