from SimPy.SimPlot import *
from SimPy.Simulation import *
from random import *
m=Monitor(name="Test")
for i in range(1000):
    m.observe(random(),i)
his=m.histogram(low=0.0,high=1.0,nbins=10)
r=SimPlot()
r.plotHistogram(his,color='blue',xlab='random nr',ylab='nr occurrences',
           title="Distribution of random numbers in range (0,1)")
r.plotBars(his,color='green',xlab='random nr',ylab='nr occurrences',
           title="Distribution of random numbers in range (0,1)")
r.mainloop()