Consider the following MWE:
Code: Select all
% Compile using
%
% latex <filename>.tex
% dvips -Ppdf -D1200 <filename>.dvi
% ps2pdf <filename>.ps
%
% and open with Adobe Reader.
\documentclass[danish]{article}
\usepackage{babel}
\usepackage{pst-func}
\usepackage{animate}
\newcommand*{\normalC}[1]{
\psset{xunit=1,yunit=5cm}
\begin{pspicture}(-5.5,-0.25)(6,1.35)
\psaxes[Dy=0.2,comma]{->}(0,0)(-5.3,0)(5.5,1.1)[$x$,0][$y$,90]
\pscustom[fillstyle=solid,fillcolor=blue!40,opacity=0.4,linecolor=red,linestyle=none]{%
\psline(0,0)(-5,0)
\psGaussI[sigma=#1]{-5}{5}
\psline(5,0)(0,0)
}
\psGaussI[sigma=#1,linecolor=red,linewidth=1pt]{-5}{5}
\rput(-3,0.6){$\sigma = #1$}
\end{pspicture}
}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{animateinline}[poster=first,controls,palindrome]{10}
\multiframe{31}{rA=0.5+0.1}{\normalC{\rA}}
\end{animateinline}
\end{figure}
\end{document}

Thank you in advance!