PND array for n-space and convertion to a histogram
Code: "points_pnd.py". Programming language: Python
DMelt Version 1. Last modified: 12/08/2015. License: Pro
https://datamelt.org/code/cache/points_pnd_6437.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.awt import Color
from jhplot import HPlot,H1D,P0D,PND
c1 = HPlot("Canvas",600,400)
c1.setGTitle("Example of PND data array", Color.blue) #put title
c1.visible()
c1.setAutoRange()
p0= PND("Example of PND")
p0.add([1,3,5])
p0.add([6,1,7])
p0.add([6,2,6,19])
p0.add([4,19,5,20,200])
p0.add([2,5,1,20,201])
p0.add([5,2,20,20,220])
p0.add([6,2,8,20,221])
print p0.toString()
# get second column
p00=p0.getColumnP0D(2)
# print column
print p00.toString()
# make histogram from 2nd row
c1.draw(p00.getH1D(100))
You see the box below because you did not login.