Show 2D (H2D) histogram in 3D using bar style and surface style
Source code name: "histo_3d.py"
Programming language: Python
Topic: Histograms/2D
DMelt Version 1. Last modified: 12/11/2015. License: Pro
https://datamelt.org/code/cache/histo_3d_2231.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 F2D,H2D,HPlot3D

c1  = HPlot3D("Canvas",600,400,2,1)
c1.visible(1)
c1.setGTitle("HPlot3D canvas tests")
rand =Random()

h1=H2D("Test1",30,-4.5, 4.5, 30, -4.0, 4.0)
for i in range(1000):
       h1.fill(rand.nextGaussian(),0.5*rand.nextGaussian())

c1.cd(1,1)
c1.setBars()
c1.draw(h1)
c1.setScaling(8)
c1.setRotationAngle(10)
c1.update()

c1.cd(2,1)
c1.setSurface()
c1.draw(h1)


You see the box below because you did not login.