Interactive fit using Jas
Source code name: "fit_jas.py"
Programming language: Python
Topic: Data fitting/jaida
DMelt Version 1. Last modified: 12/08/2015. License: Pro
https://datamelt.org/code/cache/fit_jas_8548.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 java.util import Random
from jhplot  import * 

h1 = H1D("1D  histogram",100, -2, 2.0)
p1=P1D("data with errors")
p1.add(1,10,3) # x-y and error 
p1.add(2,5,1)
p1.add(3,12,2)
rand = Random()
for i in range(500):
      h1.fill(rand.nextGaussian())     
p0=P0D("Normal distribution")
p0.randomNormal(1000,0.0,10.0)
from  java.util import ArrayList
a=ArrayList([h1,p1,p0])
c=HPlotJas("JAS",ArrayList([h1,p1,p0]))


You see the box below because you did not login.