MVLib - Short Writeup - Version 4.0
Example Number 18 - Histogram booking and plotting
This simple example shows how to book and plot an histogram, the calls to mvbook allow to define an histogram, the calls to mvbookfill fille the histogram data structure defined by MVLIb and mvbookplot plot the histograms that can be composed in variety of way.
The source code to produce these plots is available here and the complete script running the code is available here.
Previous Example List of Examples Next Example
MVLib Home Page
	nbin=40
	call mvbook(10,0.0,1.0,nbin,' Test N. 1')
	call mvbook(20,0.2,0.8,nbin,' Test N. 2')
	call mvbook(30,0.0,1.0,nbin,' Test N. 3')
	do i=1,10000
	   call mvbookfill(10,gauss(0.5,0.2),1.0)
	   if (mod(i,2).eq.0) call mvbookfill(20,gauss(0.5,0.1),1.0)
	   if (mod(i,3).eq.0) call mvbookfill(30,gauss(0.5,0.2),1.0)
	enddo
	call mvsetflags('palette di colori',8.0)

	call mvsetplotframe(0.1,0.9,0.5,0.9)
	call mvsetflags('Histogram color',6.0)
	call mvbookplot(10)
	call mvsetflags('Histogram color',8.0)
	call mvbookplot(20)
	call mvsetflags('Histogram color',7.0)
	call mvbookplot(30)

	call mvsetplotframe(0.1,0.9,0.1,0.5)
	call mvsetflags('Histogram color',3.0)
	call mvbookplot(20)
	call mvsetflags('X size',1000.0)
	call displayexample('example18','MVBook subpackage example',' ')
        end