# [pstricks] skipping domain values in psplot

Hensh, Richard hensh at math.msu.edu
Fri Mar 19 14:47:11 CET 2010

Dear All,

The code fragment below works exactly as expected. The gamma function is plotted from
x= -0.99 to x = 5 and the vertical asymptote at x=0 is ignored. Is there a way modify my postscript definition of f at x further to trick (no pun intended) psplot into ignoring multiple inputs. The appropriate list in this example would be {-5, -4, ..., 0} but, in general, such a list could be arbitrary.

%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage{pstricks,pst-all}
\begin{document}
\def\xmin{-5}\def\xmax{5}
\def\ymin{-16}\def\ymax{16}
\def\dommin{-0.99}\def\dommax{\xmax}
\psset{xunit=10mm,yunit=3mm}
\pstVerb{%
/f at x {dup 0 eq {} {GAMMA} ifelse} def
}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
%\showgrid
\psaxes[labels=none,ticks=none,axesstyle=axes,arrowscale=1.5]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)
\SpecialCoor
\psclip{\psframe[linecolor=white](\xmin,\ymin)(\xmax,\ymax)}
\psplot[linecolor=blue,plotpoints=200,linewidth=1.25pt,plotstyle=curve]
{\dommin}{\xmax}{x f at x}
\endpsclip
\NormalCoor
\end{pspicture}
\end{document}
%%%%%%%%%%%%%%%%%

Or perhaps this has already been implemented in PSTricks?

thanks,
rick