ClearAll;
$DefaultFont = {"Times-Roman",10};
Needs["Graphics`Graphics`"];
njags = 100;
a = 1; b = 4; M = (a+b)/2; mu = (a+b)/2; Mpl = 3.2; Mm = 1.8;
coeff = 2; 
scale = NIntegrate[Exp[-coeff(x-mu)^2],{x,a,b}];
lp1 = Graphics[{Dashing[0.001,0.01],Line[{{Mpl,0},{Mpl,f1[Mpl]}}]}];
lm1 = Graphics[{Dashing[0.001,0.01],Line[{{Mm,0},{Mm,f1[Mm]}}]}];
poly[a_,b_,f_]:= Join[Table[{a+i(b-a)/njags,f[a+i(b-a)/njags]},
				  {i,0,njags}],{{b,0},{a,0}}];
shade[a_,b_,c_,f_]:= Graphics[{GrayLevel[c],Polygon[poly[a,b,f]]}];
f1[x_]:= 1/(b-a);
f2[x_]:= 2/(b-a) - Abs[4x - 2(a+b)]/((b-a)^2);
f3[x_]:= Exp[-coeff(x-mu)^2]/scale;
lp1 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mpl,0},{Mpl,f1[Mpl]}}]}];
lm1 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mm,0},{Mm,f1[Mm]}}]}];
lp2 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mpl,0},{Mpl,f2[Mpl]}}]}];
lm2 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mm,0},{Mm,f2[Mm]}}]}];
lp3 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mpl,0},{Mpl,f3[Mpl]}}]}];
lm3 = Graphics[{Dashing[{0.001,0.01}],Line[{{Mm,0},{Mm,f3[Mm]}}]}];

shading1 = Show[shade[a,mu,0.65,f1],shade[mu,b,0.35,f1],Axes->True,
		   Ticks->{{{a,"a"},{Mm,"M-t"},{M,"M"},{Mpl,"M+t"},
		   {b,"b"}},{0}}, PlotRange->{{0,5},Automatic},
			PlotLabel->"Uniform distribution",
			AxesLabel->{"x","f"}];
plot1 = Plot[f1[x],{x,a,b}];
shading2 = Show[shade[a,mu,0.65,f2],shade[mu,b,0.35,f2],Axes->True,
		   Ticks->{{{a,"a"},{Mm,"M-t"},{M,"M"},{Mpl,"M+t"},
		   {b,"b"}},{0}}, PlotRange->{{0,5},Automatic},
			PlotLabel->"Triangular distribution",
			AxesLabel->{"x","f"}];
plot2 = Plot[f2[x],{x,a,b}];
			 
shading3 = Show[shade[a,mu,0.65,f3],shade[mu,b,0.35,f3],Axes->True,
		   Ticks->{{{a,"a"},{Mm,"M-t"},{M,"M"},{Mpl,"M+t"},
		   {b,"b"}},{0}}, PlotRange->{{0,5},Automatic},
			PlotLabel->"Bell-shaped distribution",
			AxesLabel->{"x","f"}];

plot3:= Plot[f3[x],{x,a,b}];

panel1 = Show[shading1,plot1,lp1,lm1];
panel2 = Show[shading2,plot2,lp2,lm2];
panel3 = Show[shading3,plot3,lp3,lm3];	
Show[GraphicsArray[{{panel1},{panel2},{panel3}}],
		PlotLabel->"                            Figure 28.1\n
		Symmetric distributions with decreasing variance"]