from paida import IAnalysisFactory analysisFactory = IAnalysisFactory.create() treeFactory = analysisFactory.createTreeFactory() tree = treeFactory.create() ### Creating histograms. histogramFactory = analysisFactory.createHistogramFactory(tree) ### Fixed bin width histogram. h3dF = histogramFactory.createHistogram3D('fixed', 'Fixed', 10, 0.0, 20.0, 10, 0.0, 20.0, 10, 0.0, 20.0) ### Filling with gaussian. import random r = random.Random() for i in range(1000): h3dF.fill(r.gauss(10.0, 3.0), r.gauss(10.0, 3.0), r.gauss(10.0, 3.0)) ### Plotting the histogram. plotterFactory = analysisFactory.createPlotterFactory() plotter = plotterFactory.create('PAIDA Plotter') region = plotter.createRegion() region.setTitle('Box format') region.style().setParameter('showTitle', 'true') region.style().dataStyle().fillStyle().setColor('blue') region.plot(h3dF) ### Wait. dummy = raw_input('Hit any key.')