← All examples

Large-Scale Function Plot

A scaled psplot with custom units and axis labels.

Rendering LaTeX…

Source

\psset{unit=0.5cm}
\begin{pspicture}(-13,-5)(13,10)

\slider{1}{8}{a}{amplitude}{4}
\slider{1}{8}{n}{frequency}{4}

\psplot[algebraic,linewidth=1.5pt,plotpoints=1000]{-12.56}{12.56}{a*sin(n*x)/(n*x)}
\psaxes[showorigin=false,labels=none, Dx=3.14](0,0)(-12.6,0)(12.6,0)

\rput(0, -0.5){$0$}

\end{pspicture}
Open in sandbox