Profile 2D histogram HProf1D on HPlot3D
Source code name: "histo_prof2d.py"
Programming language: Python
Topic: Histograms/Profile
DMelt Version 1. Last modified: 12/11/2015. License: Pro
https://datamelt.org/code/cache/histo_prof2d_7076.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 jhplot import *
from java.util import Random

# export to some image (png,eps,pdf,jpeg...)
# c1.export(Editor.DocMasterName()+".png")
from jhplot import *
from java.util import Random

c1 = HPlot3D("Canvas")
c1.setGTitle("Gaussian mean")
c1.setRange(0,10,0.0,5)
c1.setNameX("X")
c1.setNameY("Y")
c1.visible()

h2=HProf2D("Profile1D",10,0.0,10.0,10,0.0,5.0)
r=Random()
for i in range(5000):
  h2.fill(10*r.nextDouble(),5*r.nextDouble(),r.nextGaussian()+2)

c1.draw( h2.getH2D() )


You see the box below because you did not login.