[pstricks] psplot and continuity

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Jul 19 09:51:21 CEST 2008

Loïc schrieb:

> I would like to prevent discontinuity on the plotted functions.
> Remark:
> - Before discontinuity, the slope is around 20
> - After discontinuity, the slope is around -20
> I think It would be wonderful if  the \psplot command implement an 
> argument specifying the maximum slope jump allowed between two points.
> For example:
> \psplot[plotpoints=200,max_slope=10]{-4.3}{8.38}{tan(x)}
> won't connect any points with a slope difference greater than 10.

it is easier with an absolute max value and clipping

\def\doqp at line{ dup abs \maxTan gt { moveto }{ L } ifelse }
\def\maxTan{10 \pst at number\psyunit mul }% 10 in screen coor


\psset{algebraic,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\psaxes[ticksize=-2pt 0,subticks=2]{->}(0,0)(-4.3,-3.88)(8.38,6.3)



More information about the PSTricks mailing list