MVLib - Short Writeup - Version 4.0
Example Number 20 - Histogramming Po river Flow Discharge
This simple example shows how to book and plot the Po river Flow Discharge retrieving the data from MuSEO database. To retrieve the data the routine museoanagrafica and museotimeseries are used. The histogram structure si defined by a call to mvbook routines and the plot are produced by a sequence of calls to mvbookplot routine. The fortran code is available here and the complete script running the code is available here.
Previous Example List of Examples Next Example
MVLib Home Page
	character com*40,sens*40,stitle*60 ; real xlat,xlon
	integer rec,anno ; real x(366*24),y(366*24)
	real hmax(7) ; data hmax /0.0,0.2000,3000.0,3500.0,4200.0,4200.0,1500.0/
	do rec=3,7 
	   call museoanagrafica ('Po',rec,com,sens,xlat,xlon)
	   call latlon2str(xlat,xlon,sens)
	   stitle=com(1:lenstr(com))//' ('//sens(1:lenstr(sens))//')'
	   call mvbook(10,100.0,hmax(rec),40,'1995-1999')
	   call mvbook(20,100.0,hmax(rec),40,'2000-2004')
	   do anno=1995,1999
	      call museotimeseries('Po',rec,anno,x,y,n)
	      call mvbookvfill(10,y,n)
	   enddo
	   do anno=2000,2004
	      call museotimeseries('Po',rec,anno,x,y,n)
	      call mvbookvfill(20,y,n)
	   enddo
	   call mvsetflags('palette di colori',8.0)

	   call mvsetflags('histogram statistic',1.0)
	   call mvsetflags('histogram color',8.0)
	   call mvsetplotframe(0.0,0.9,0.63,0.93)
	   call mvbookplot(10)
	   call mvsetplotframe(0.0,0.9,0.33,0.63)
	   call mvsetflags('histogram color',6.0)
	   call mvbookplot(20)
	   call mvsetplotframe(0.0,0.9,0.05,0.35)
	   call mvsetflags('histogram statistic',0.0)
	   if (rec.eq.4.or.rec.eq.3) then
	      call mvsetflags('histogram color',6.0)
	      call mvbookplot(20)
	      call mvsetflags('histogram color',8.0)
	      call mvbookplot(10)
	   else
	      call mvsetflags('histogram color',8.0)
	      call mvbookplot(10)
	      call mvsetflags('histogram color',6.0)
	      call mvbookplot(20)
	   endif
	   call displayexample('example20','Po river discharge (m\S\3\N\/sec)',stitle)
	enddo
        end