[pstricks] ConTeXt and PSTricks

Herbert Voss Herbert.Voss at FU-Berlin.DE
Tue Feb 17 21:16:44 CET 2015


Am 17.02.2015 um 19:09 schrieb Fabrice:

> If I want to cut straight tracks, I use \psclip .... \endpsclip. This
> works, but the labels position is affected("x", "y", "1").

I have no running ConTeXt. Try

\pspicture*(-5,-4)(3,6)
..
\endpspicture

instead of clipping.

Herbert



>
> \usemodule[pstricks]
>
>
> \starttext
>
> \startPSTRICKS
> \newcmykcolor{mycolor}{.4 .0 .0 .0}
> \psset{xunit=1cm,yunit=1cm,arrowscale=1.3,algebraic=true,linewidth=1pt}
> \pspicture(-5,-4)(3,6)
> \def\F{x+5}
> \def\G{-x-3}
> \def\H{2*x}
> \psgrid[subgriddiv=0,gridlabels=0,gridcolor=mycolor](-5,-4)(3,6)
> \psaxes[labels=none,Dx=1,Dy=1,ticksize=3pt
> -3pt]{->}(0,0)(-4.99,-3.99)(2.99,5.99)
>
> \psclip
> {\psframe[linestyle=none](-5,-4)(3,6)}
> {\psplot[plotpoints=2000]{-5}{3}{\F}}
> {\psplot[plotpoints=2000]{-5}{3}{\G}}
> {\psplot[plotpoints=2000]{-5}{3}{\H}}
> \endpsclip
>
> \uput[d](2.8,0){$x$}
> \uput[dl](-0.1,-0.1){$0$}
> \uput[l](0,5.8){$y$}
> \uput[l](0,1){$1$}
> \uput[d](1,0){$1$}
> \uput[dr](2,4){$d_1$}
> \uput[dr](-2,3){$d_2$}
> \uput[dl](-2,-1){$d_3$}
> \endpspicture
> \stopPSTRICKS
> \stoptext

>



More information about the PSTricks mailing list