[pstricks] psplotTangent

Herbert Voss Herbert.Voss at fu-berlin.de
Tue Dec 1 19:59:12 CET 2020


Am 01.12.20 um 18:00 schrieb Denis Verges
>
> %%%%%%%%%
> \begin{center}
> \psset{xunit=1cm,yunit=0.5cm}

you should provide _complete_ examples, not only fragments!

Use the algebraic notation:

\documentclass{article}
\usepackage{pstricks-add}
\begin{document}

\begin{center}
\psset{xunit=1cm,yunit=0.5cm}
\begin{pspicture*}(-3,-5)(6,6)
\psgrid[gridlabels=0pt,subgriddiv=1,gridwidth=0.1pt]
\psaxes[linewidth=1.25pt,Dx=10,Dy=10](0,0)(-3,-5)(6,6)
\psaxes[linewidth=1.5pt]{->}(0,0)(1,1)
\psset{algebraic}
\psplot[plotpoints=2000,linewidth=1.25pt,linecolor=red]{-2}{5}{3*x^2-5*x+1}
\psplotTangent[linecolor=blue]{0}{10}{3*x^2-5*x+1}
\psplotTangent[linecolor=blue]{2}{10}{3*x^2-5*x+1}
\uput[ur](0,1){A}\uput[r](2,3){B} 
\uput[l](1,-4){C}\uput[r](-0.7,5.5){\red $\mathcal{P}$}
\end{pspicture*}
\end{center}

\end{document}


Herbert



> \begin{pspicture*}(-3,-5)(6,6)
> \psgrid[gridlabels=0pt,subgriddiv=1,gridwidth=0.1pt]
> \psaxes[linewidth=1.25pt,Dx=10,Dy=10](0,0)(-3,-5)(6,6)
> \psaxes[linewidth=1.5pt]{->}(0,0)(1,1)
> \psplot[plotpoints=2000,linewidth=1.25pt,linecolor=red]{-2}{5}{x dup 
> mul 3 mul 5 x mul sub 1 add}
> \psplotTangent[linecolor=blue]{0}{10}{x dup mul 3 mul 5 x mul sub 1 add}
> \psplotTangent[linecolor=blue]{2}{10}{x dup mul 3 mul 5 x mul sub 1 add}
> \uput[ur](0,1){A}\uput[r](2,3){B} 
> \uput[l](1,-4){C}\uput[r](-0.7,5.5){\red $\mathcal{P}$}
> \end{pspicture*}
> \end{center}
> %%%%%%%%%
> Why the tangent in x = 0 is false ?
> Thanks.
> Denis
>
> --
> list: https://lists.tug.org/pstricks
> archive: https://tug.org/pipermail/pstricks/



More information about the PSTricks mailing list.