next up previous
Next: Drawing a function Up: 2D and 3D plotting Previous: 2D plots superposition

Drawing 2D histogram

histplot([-6:0.2:6],rand(1,2000,'n'),[1,-1],'011',' ',[-6,0,6,0.5],[2,12,2,11]);
// compute random law density
deff('[y]=f(x)','y=exp(-x.*x/2)/sqrt(2*%pi);');
// superpose the density on the histogram
x=-6:0.1:6;x=x';plot2d(x,f(x),1,"000");
xtitle('macro histplot : Histogram plot','Classes','N(C)/Nmax');
\fbox{\epsfig{file=foo0_10.eps,width=3.75in}}

Scilab group