[pstricks] courbe avec pstricks et un peu de pscustom
Herbert Voss
herbert49 at googlemail.com
Tue Sep 23 11:01:50 CEST 2008
idrevetnom schrieb:
> Mais je ne vois pas les étiquettes v_0, v_1, v_2, que devrait donner le
> \uput{1ex}[90](!x,0){$v_i$}
Without \pscustom it is a lot easier:
\documentclass{article}
\usepackage{amsmath}
\usepackage{pstricks-add}
\begin{document}
\begin{center}
\psset{xunit=2cm,yunit=2cm,algebraic=true}
\begin{pspicture}[showgrid=true](-5,-5)(1,1)
\psaxes{->}(0,0)(-5,-5)(1,1)[$x$,-90][$y$,180]%
\rput(-2,-3){{$y=\dfrac{-2x+8}{~~2x-2}$}}%
\psplot {-5}{0.10}{x }%
\psplot[linecolor=red,linewidth=1.5pt]{-5}{0.10}{(-2*x+8)/(2*x-2)}%
\def\function{ -2 xVal mul 8 add 2 xVal mul -2 add div }%
\pstVerb{ /xVal 0 def }% start value
\multido{\nA=0+1}{4}{%
\psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal xVal )(! xVal
\function )
\psline[linecolor=blue,linewidth=1.5pt]{->}(! xVal \function )(!
\function\space dup)
\pstVerb{ /xVal \function\space def}
\psline[linestyle=dashed,linecolor=blue]{->}(! xVal xVal)(! xVal 0 )
\uput{1ex}[90](! xVal 0 ){$v_{\nA}$}
}
\end{pspicture}
\end{center}
\end{document}
Herbert
More information about the PSTricks
mailing list