
from jhplot  import HPlot3D,H2D
from java.util import Random

c1 = HPlot3D("Canvas",600,600)
c1.visible()
c1.setNameX("X")
c1.setNameY("Y")
c1.setRangeZ(0,20)
c1.setDensity()

h1 = H2D("Contour",30,-2.0,2.0,30,-2.0,2.0)
h1.fillGauss(1000, 0, 1.0, 0, 0.2)      # X=0,Y=0 (sX=1,sY=0.2) 
h1.fillGauss(800, 1.0, 0.5, -1.0, 0.2)  # X=1,Y=1 (sX=0.5, sY=0.2) 
c1.draw(h1)


# export to some image (png,eps,pdf,jpeg...)
# c1.export(Editor.DocMasterName()+".png")
