from jhplot import *
from java.util import Random
c1 = HPlot("Canvas")
c1.setGTitle("Profile histogram")
c1.setRange(0,11,1.5,2.5)
c1.setNameX("X")
c1.setNameY("Gaussian mean")
c1.visible()
h2=HProf1D("Profile1D",10,0.0, 11.0)
r=Random()
for i in range(2000):
h2.fill(10*r.nextDouble(),r.nextGaussian()+2)
h1=h2.getH1D()
h1.setStyle('p')
c1.draw(h1)
# export to some image (png,eps,pdf,jpeg...)
# c1.export(Editor.DocMasterName()+".png")
Ads help maintain this website.