Styles for histograms using Jaida
Source code name: "histo_jaida4.py"
Programming language: Python
Topic: Histograms/1D
DMelt Version 1. Last modified: 12/11/2015. License: Free
https://datamelt.org/code/cache/histo_jaida4_4573.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



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