program OneHist; {$I typedef.bic} {these files must be} {$I graphix.bic} {included and in this order} {$I kernel.bic} {$I hatch.hgh} {$I histogrm.hgh} procedure HistoDem; var i,DisplyLen,HatchDen:integer; a:PlotArray; r:real; ch:char; Hatch:boolean; begin DisplyLen:=10; {draw ten bars} for i:=0 to DisplyLen do {init the display array with random #'s} begin; a[i+1,2]:=random; end; DefineWindow(1,0,0,XMaxGlb,YMaxGlb); DefineWorld(1,-11,1.0,11,0); SelectWorld(1); SelectWindow(1); Hatch:=true; {enable hatching} HatchDen:=7; {draw hatch lines this far apart} DrawHistogram(a,-DisplyLen,Hatch,HatchDen); {draw the bar chart} end; begin InitGraphic; {initialize the graphics system} HistoDem; {do the demo} readln; LeaveGraphic; end.