[pstricks] - plotstyle=line versus curve in pscustom

Christoph Bersch usenet at bersch.net
Mon Oct 24 10:08:33 CEST 2011


Hi Richard,

On 24.10.2011 00:42, Hensh, Richard wrote:
> \psclip{\psframe[linestyle=none](\xmin,\ymin)(\xmax,\ymax)}
>      \myplot[linecolor=gray,linewidth=1.0pt,linestyle=dashed]{\xmin}{\xmax}{x}%
>      \pscustom[plotpoints=200,linecolor=gray,linewidth=0.0pt]{%
>        \translate(!0 x0)%
>        \psCumIntegral{0}{\xmax}{f at x}%
>        \stroke[linecolor=blue,linewidth=2.0pt]
>        %\newpath
>        \translate(!0 x0 neg)%
>        \myplot{\xmin}{\xmax}{x L at x}%
>        \stroke[linecolor=gray,linewidth=1.0pt]
>      }
>    \endpsclip

Why do you use \pscustom, to draw two distinct functions? The purpose of 
\pscustom is to join different segments to a _single_ path, therefore 
also the linewidth and linecolor settings of \psplot etc. are ignored 
(which you "fix" by using \stroke).

Just use the following:

\psclip{\psframe[linestyle=none](\xmin,\ymin)(\xmax,\ymax)}
   \myplot[linecolor=gray,linewidth=1.0pt,linestyle=dashed]%
       {\xmin}{\xmax}{x}%
   \rput(!0 x0){%
       \psCumIntegral[linecolor=blue,linewidth=2.0pt,plotpoints=200]%
           {0}{\xmax}{f at x}%
   }%
   \myplot[linecolor=gray,linewidth=1.0pt]{\xmin}{\xmax}{x L at x}%
\endpsclip

You can also replace \myplot by \psline

Christoph


More information about the PSTricks mailing list