Description of the user defined constants:

Note that: the description diagram above uses constants to provide enough spaces for annotations. And the following example uses different constants. Don't get confused!
User defined constants:
\def\f(#1){sin(#1)}% function to plot
\def\g(#1){1.5*cos(2*#1)}% function to plot
\const{Width}{10}% total width in cm
\const{Height}{4}% total height in cm
\const{POL}{-0.20}% pspicture left offset in cm
\const{POR}{ 0.50}% pspicture right offset in cm
\const{POB}{-0.20}% pspicture bottom offset in cm
\const{POT}{ 0.50}% pspicture top offset in cm
\const{AOL}{-0.20}% axis left offset in cm
\const{AOR}{ 0.30}% axis right offset in cm
\const{AOB}{-0.20}% axis bottom offset in cm
\const{AOT}{ 0.30}% axis top offset in cm
\const{DomL}{-2*pi}% domain left
\const{DomR}{2*pi}% domain right
\const{DomB}{-2}% domain bottom
\const{DomT}{ 2}% domain top
\const[0]{TrigLabelBase}{2}% denominator for a fraction of pi
Output and the complete code:

\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-eucl,pstricks-add}
\usepackage[nomessages]{fp}
\newcommand\const[3][3]{\expandafter\FPeval\csname#2\endcsname{round(#3:#1)}}
% User defined data:
\def\f(#1){sin(#1)}% function to plot
\def\g(#1){1.5*cos(2*#1)}% function to plot
\const{Width}{10}% total width in cm
\const{Height}{4}% total height in cm
\const{POL}{-0.20}% pspicture left offset in cm
\const{POR}{ 0.50}% pspicture right offset in cm
\const{POB}{-0.20}% pspicture bottom offset in cm
\const{POT}{ 0.50}% pspicture top offset in cm
\const{AOL}{-0.20}% axis left offset in cm
\const{AOR}{ 0.30}% axis right offset in cm
\const{AOB}{-0.20}% axis bottom offset in cm
\const{AOT}{ 0.30}% axis top offset in cm
\const{DomL}{-2*pi}% domain left
\const{DomR}{2*pi}% domain right
\const{DomB}{-2}% domain bottom
\const{DomT}{ 2}% domain top
\const[0]{TrigLabelBase}{2}% denominator for a fraction of pi
% Internal used constants:
\const{XUnit}{(Width-POR+POL-AOR+AOL)/(DomR-DomL)}
\const{YUnit}{(Height-POT+POB-AOT+AOB)/(DomT-DomB)}
\const{PicL}{(POL+AOL)/XUnit+DomL}
\const{PicR}{(POR+AOR)/XUnit+DomR}
\const{PicB}{(POB+AOB)/YUnit+DomB}
\const{PicT}{(POT+AOT)/YUnit+DomT}
\const{AxiL}{AOL/XUnit+DomL}
\const{AxiR}{AOR/XUnit+DomR}
\const{AxiB}{AOB/YUnit+DomB}
\const{AxiT}{AOT/YUnit+DomT}
\const{DeltaX}{pi/TrigLabelBase}
\psset{xunit=\XUnit,yunit=\YUnit,algebraic,plotpoints=500}
\begin{document}
\begin{pspicture}[showgrid=false](\PicL,\PicB)(\PicR,\PicT)
\psplot[linecolor=red]{\DomL}{\DomR}{\f(x)}
\psplot[linecolor=blue]{\DomL}{\DomR}{\g(x)}
\psaxes
[
trigLabels=true,
labelFontSize=\scriptscriptstyle,
tickcolor=gray,
ticksize=-1.5pt 1.5pt,
xlabelsep=3pt,
arrowscale=1,
trigLabelBase=\TrigLabelBase,
dx=\DeltaX,% must come before xunit to avoid getting a strange output!
]{->}(0,0)(\AxiL,\AxiB)(\AxiR,\AxiT)[$x$,0][$y$,90]
\end{pspicture}
\end{document}
tikzis really easy. For examle with\draw[domain=0:7] plot (\x, {sin(\x)});. But there is also the very convenientpgfplotspackage, based ontikz/pgfthat has even more special purpose commands for drawing plots with axis and all. – bodo Jul 21 '12 at 08:43tikz/pgfsuch that I have the pi style labels on the axis without having to list the numbers (like 3.14159....) and listing the\frac{\pi}{2}sort of stuff. – KangarooWest Jul 22 '12 at 03:22