coachbennett1981 wrote:The graph works when I run it in TexShop. [...] When you run the graph for a given domain, the graph does stop, but I would like arrows to appear at both ends of the graph {<->) for the graph. [...]
It's absolutely clear to me what you want but it seems not possible to have graphs with arrows at the end. This still doesn't make sense to me because the graph of a function has not the character of a vector. Perhaps you should adjust the domain to show that the graph leaves this part of the coordinate system thus is continued outside.
Code: Select all
\listfiles
\documentclass{minimal}
\usepackage{pst-func,pstricks-add}
\begin{document}
\begin{pspicture}[showgrid=false](-4,-2)(5,3)
\psPolynomial[coeff=2 -1 -1 .5 -.1 .025,linewidth=2pt,linecolor=red]{-1.61}{3.22}
\psaxes[linewidth=1.2pt]{->}(0,0)(-4,-2)(5,3)
\psdot*[dotsize=5pt](2,-0.8)
\psdot*[dotsize=5pt](-0.4,2.2052)
\uput[dr](2,-0.8){Relative minimum}
\uput[ul](-0.2,2.2052){Relative maximum}
\end{pspicture}
\end{document}
There is always the possibility to use the
pspicture* environment to cut everything that goes beyond the specified coordinates. That's all I can advice at the moment.
coachbennett1981 wrote:[...] When I run the code with this {<->} write at the beginning of \psPolynomial{<->}. [...]
This sentence is very confusing.