from paida import * analysisFactory = IAnalysisFactory.create() treeFactory = analysisFactory.createTreeFactory() tree = treeFactory.create() ### Creating clouds and histograms. histogramFactory = analysisFactory.createHistogramFactory(tree) c1d = histogramFactory.createCloud1D('unlimited', 'Unlimited') h1d1 = histogramFactory.createHistogram1D('histogram1', 'Histogram1', 30, -10.0, 10.0) h1d2 = histogramFactory.createHistogram1D('histogram2', 'Histogram2', 40, -20.0, 20.0) ### Filling with gaussian. import random r = random.Random() for i in range(2000): c1d.fill(r.gauss(0.0, 7.0)) ### Conversion. c1d.fillHistogram(h1d1) c1d.fillHistogram(h1d2) ### Plotting the histogram. plotterFactory = analysisFactory.createPlotterFactory() plotter = plotterFactory.create('PAIDA Plotter') plotter.createRegions(2, 2) plotter.region(0).setTitle('Cloud1D in scatter format') plotter.region(0).style().setParameter('showTitle', 'true') plotter.region(0).style().dataStyle().setParameter('cloud1DFormat', 'scatter') plotter.region(0).plot(c1d) plotter.region(1).setTitle('Cloud1D in scatterIndexed format') plotter.region(1).style().setParameter('showTitle', 'true') plotter.region(1).style().dataStyle().setParameter('cloud1DFormat', 'scatterIndexed') plotter.region(1).plot(c1d) plotter.region(2).setTitle('Dynamic filling to [-10.0, 10.0]') plotter.region(2).style().setParameter('showTitle', 'true') plotter.region(2).plot(h1d1) plotter.region(3).setTitle('Dynamic filling to [-20.0, 20.0]') plotter.region(3).style().setParameter('showTitle', 'true') plotter.region(3).plot(h1d2) ### Wait. dummy = raw_input('Hit any key.')