set xrange [-1:3] set yrange [-1:4] set zeroaxis set xlabel 'x' set ylabel 'f(x)' set nokey set label 1 'a' at 0.5,-0.1 set label 2 'b' at 2.5,-0.1 set label 3 ' M_1' at 0,1 set label 4 ' M_2' at 0,2.02 set noxtics set noytics f(x)=x<0.5 ? 1/0 : x>2.5 ? 1/0 : -(x-1)**2 +(x-1)**3+1 g(x)=x<0.5 ? 1/0 : x>1.5 ? 1/0 : 1 z(x)=x<1.5 ? 1/0 : x>2.5 ? 1/0 : 2.02 plot f(x) with lines , g(x) with lines, g(x) with impulse, z(x) with lines, z(x) with impulse set terminal postscript enhanced set output "c:\\quattro.ps" replot