Two histograms shown as a contour using HPlotJa
Source code name: "canvas2D_contour5.py"
Programming language: Python
Topic: Plots/Contour
DMelt Version 1. Last modified: 11/15/2015. License: Pro
https://datamelt.org/code/cache/canvas2D_contour5_2474.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 *
from jhplot.jadraw import *
from java.util import *
from java.awt import *

c1=HPlot2D("Canvas",600,400,1,1)
f=Font("Arial", Font.BOLD, 18)
c=Color.RED
c1.setGTitle("Global title",f,c)
c1.visible()
c1.setAutoRange()

h1=H2D("2 Gaussians",80,-3.0, 3.0,80, -3.0, 3.0)
r=Random()
for i in range(50000):
    h1.fill(0.6*r.nextGaussian()-0.5,r.nextGaussian())
    h1.fill(0.4*r.nextGaussian()+1,0.8*r.nextGaussian()+0.5)

c1.draw(h1)


You see the box below because you did not login.