18 Plotting 2D histograms

The class was derived from the class Histogram2D of JAIDA. You can plot 2D histograms in the same way as for 2D functions:

>>> from jhplot  import HPlot3D
>>> from jhplot  import H2D
>>> from java.util import Random
>>> c1 = HPlot3D("Canvas",600,400)
>>> c1.visible(1)
>>> c1.setNameX("X axis")
>>> c1.setNameY("Y axis")
>>> h1 = H2D("My 2D Test 1",30,-3.0, 3.0, 30, -3.0, 3.0)
>>> rand = Random()
>>> for i in range(5000):
...          h1.fill(rand.nextGaussian(),rand.nextGaussian())
>>> c1.draw(h1)

You can overlay two 2D histograms on one figure. In addition, you can plot histogram and a function on the same HPlot3 plot. See the example in ``macros/example/histo2D_2h.py'' and ``macros/example/histo2D_2hf.py''.