Show data points with uncertainties using two plot areas
Source code name: "jaida_DataPointFill.java"
Programming language: Java
Topic: Data arrays/DataPointSet
DMelt Version 1. Last modified: 08/18/2016. License: Pro
https://datamelt.org/code/cache/jaida_DataPointFill_8847.java
To run this script using the DataMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



import hep.aida.*;

public class jaida_DataPointFill
{
   public static void main(String[] argv)
   {    
      IAnalysisFactory af = IAnalysisFactory.create();
      ITree tree = af.createTreeFactory().create();
      IDataPointSetFactory dpsf = af.createDataPointSetFactory(tree);
      
      // Create a one dimensional IDataPointSet.
      IDataPointSet dps1D = dpsf.create("dps1D","one dimensional IDataPointSet",1);

      // Fill the one dimensional IDataPointSet
      double[] yVals1D = { 0.32, 0.45, 0.36, 0.29, 0.34 };
      double[] yErrP1D = { 0.06, 0.07, 0.03, 0.07, 0.04 };

      for ( int i = 0; i

Ads help maintain this website.