[pstricks] including ps code

Hensh, Richard hensh at math.msu.edu
Thu Dec 25 08:23:47 CET 2008


Try something like:

\psset{unit=10mm}
\def\xmin{-5}\def\xmax{5}
\def\ymin{-5}\def\ymax{5}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)%
\pstVerb{%
    /m@ {-2} def %
    /b@ {3} def %
    /line@ {m@ mul b@ add} def %
}
    %\showgrid
    \psaxes{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)%
    \SpecialCoor%
    \psclip{\psframe(\xmin,\ymin)(\xmax,\ymax)}
      \psplot[linecolor=blue]{\xmin}{\xmax}{x line@}%
    \endpsclip
      \psdots[linewidth=1.5pt,linecolor=red](! 1 dup line@)
    \NormalCoor
\end{pspicture}


regards
rick

________________________________________
From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] On Behalf Of John Frampton [j.frampton at neu.edu]
Sent: Wednesday, December 24, 2008 3:12 PM
To: pstricks at tug.org
Subject: [pstricks] including ps code

I want to do something like:

/A {...} def
/B {...} def
\psplot{x A mul B add}

How do I get get the definitions of A and B into the dictionary so that
\psplot can make use of them?

Thanks,
John Frampton

_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks


More information about the PSTricks mailing list