# Wrong rendering in PDF viewer?

Consider the following example:

Code

\documentclass{article}

\begin{document}

\begin{figure}
\centering
\psset{xunit=0.09cm,yunit=1.8cm}
\begin{pspicture}(-5,-0.25)(120,3)
\psaxes[Dx=10,Dy=0.5,comma]{->}(0,0)(-5,-0.25)(105,2.7)[$p$~(\%),0][$u$~(\%),90]
\psplot[algebraic,linewidth=1.25pt,linecolor=red]{0}{100}{2*sqrt(x*(100-x)/1633)}
\end{pspicture}
\end{figure}

\end{document}


Output

There are some wierd dents in the graph at the highlighted parts. Is this a problem with my PDF viewer or is it an error in pstricks-add?

I have tried both Evince and Adobe Reader as viewers but with the same result.

P.S. I am using Fedora 18 with the xfce desktop environment. (I am not sure if this is relevant.)

-
Have you tried printing the page? Maybe it's just a rendering problem and will disappear on paper. – Stephan Lukasczyk Mar 5 '13 at 8:40

It is not a rendering problem. It is a problem caused by \psplot, which evaluates the given equation at regular intervals, and then connects with straight lines the resulting points.

You can control how many points are evaluated (and thus the distance among them) using the key plotpoints. If you reduce the number, the effect is dramatically visible:

\psplot[plotpoints=10, algebraic,linewidth=1.25pt,linecolor=red]{0}{100}{2*sqrt(x*(100-x)/1633)}


Note that the sampling distance in the x-axis is constant, but in the extremes of this curve the slope is much more pronounced, and then the slope discontinuity much more noticeable.

Using more points the effect is almost unnoticeable:

\psplot[plotpoints=500,algebraic,linewidth=1.25pt,linecolor=red]{0}{100}{2*sqrt(x*(100-x)/1633)}


-
Excellent answer! – Svend Tveskæg Mar 5 '13 at 9:00