H2D histogram shown as a 3D lego plot
Code: "canvas2D_lego.py". Programming language: Python DMelt Version 1. Last modified: 12/11/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_lego_7899.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 HPlot3D,H2D
from java.util import Random

c1 = HPlot3D("Canvas",600,600)
c1.visible()
c1.setNameX("F_{α}")
c1.setNameY("Y^{β}")
c1.setLabelOffsetX(1.04)
c1.setLabelOffsetY(1.04)
c1.setPenWidthAxes(1)

h1 = H2D("My 2D Test",15,-3.0, 3.0, 15, -3.0, 3.0)
rand = Random()
for i in range(100):
               h1.fill(0.5*rand.nextGaussian(),rand.nextGaussian())
c1.draw(h1)

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

You see the box below because you did not login.