from paida import * analysisFactory = IAnalysisFactory.create() treeFactory = analysisFactory.createTreeFactory() tree = treeFactory.create() ### Creating dataPointSets. dataPointSetFactory = analysisFactory.createDataPointSetFactory(tree) dataPointSet = dataPointSetFactory.create('dataPointSet', '1D DataPointSet', 1) ### Filling. import random r = random.Random() for i in range(20): dataPoint = dataPointSet.addPoint() dataPoint.coordinate(0).setValue(i) dataPoint.coordinate(0).setErrorPlus(r.random() * 2.0) dataPoint.coordinate(0).setErrorMinus(r.random() * 2.0) ### Plotting the histogram. plotterFactory = analysisFactory.createPlotterFactory() plotter = plotterFactory.create('PAIDA Plotter') plotter.createRegions(1, 2) region = plotter.region(0) region.setTitle('scatter format') region.style().setParameter('showTitle', 'true') region.style().dataStyle().setParameter('showErrorBars', 'True') region.style().dataStyle().setParameter('dataPointSet1DFormat', 'scatter') region.plot(dataPointSet) region = plotter.region(1) region.setTitle('scatterIndexed format') region.style().setParameter('showTitle', 'true') region.style().dataStyle().setParameter('showErrorBars', 'True') region.style().dataStyle().setParameter('dataPointSet1DFormat', 'scatterIndexed') region.plot(dataPointSet) ### Wait. dummy = raw_input('Hit any key.')