\documentclass[11pt,a4paper,oneside]{article}
\usepackage{pdftricks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\RiemannSum#1#2#3#4#5#6#7#8#9{%
\psplot[linecolor=blue]{#1}{#2}{#3}
\pscustom[linecolor=red]{%
\psline{-}(#1,0)(#1,0)
\multido{\ni=#5,\ne=#6}{#4}
{\psline(*{\ni} {#8})(*{\ne} {#9})}}
\multido{\ne=#6,\nc=#7}{#4}
{\psdot(*{\nc} {#3})
\psline[linestyle=dotted,dotsep=1.5pt](\nc,0)(*{\nc} {#3})
\psline[linecolor=red](\ne,0)(*{\ne} {#9})}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\vecfld#1#2#3#4#5#6{%
\multido{#2}{#4}
{\multido{#1}{#3}
{\parametricplot[algebraic,arrows=->,linecolor=red]{0}{1}
{\nx+((#5)*t)*(1/sqrt(1+(#6)^2))|\ny+((#5)*t)*(1/sqrt(1+(#6)^2))*(#6)}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Making files \texttt{.ps} from \texttt{PSTricks}}
\begin{document}
\maketitle
\begin{psinputs}
\usepackage{pstricks}
\usepackage[dvips]{geometry}
\usepackage{pst-plot,pst-coil,multido,pst-xkey,pst-node}
\usepackage{pst-func}
\usepackage{pstricks-add}
\end{psinputs}
\section{Here is the Pstricks code to be converted}
\begin{pdfpic}
\begin{pspicture}(-1.2,-1)(5.5,5.2)
\psset{xunit=0.5cm,yunit=5cm}
\psplot[linecolor=blue,algebraic=true,plotpoints=500]
{-2}{10}{IfTE(x<1.3,(ch(1)+sh(1))^(-0.5*(x-1)^2),IfTE(x<1.8,(ch(1)+sh(1))^(-0.5*(x-1.6)^2),%
IfTE(x<2.25,(ch(1)+sh(1))^(-0.5*(x-2)^2),IfTE(x<2.75,(ch(1)+sh(1))^(-0.5*(x-2.5)^2),IfTE(x<5,(ch(1)+sh(1))^(-0.5*(x-3)^2),(ch(1)+sh(1))^(-0.5*(x-7)^2))))))}
\psaxes[labelFontSize={$\footnotesize$},Dy=0.2,tickstyle=bottom]{->}(0,0)(-2.4,-0.1)(11,1.1)[$x$,-90][$y$,180]
\end{pspicture}
\end{pdfpic}
\end{document}
