Graphics, Figures & Tablespsplot polynomial

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

psplot polynomial

Post by Mini »

Hello,

How can I graph the polynomial f(x)=(x-1)(x-3)(x+2) using psplot?

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

psplot polynomial

Post by CrazyHorse »

Mini wrote: How can I graph the polynomial f(x)=(x-1)(x-3)(x+2) using psplot?

Thanks
you could at least provide the code for a minimal example.
then it it less work for those who like to help.

Code: Select all

\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{pst-plot}

\begin{document}
\psset{yunit=0.75}
\begin{pspicture}(-4,-8)(4,8)
  \psaxes[Dy=2]{->}(0,0)(-4,-8)(4,8)[$x$,-90][$y$,180]
  \psplot[algebraic,linecolor=blue,linewidth=1.5pt,
          yMaxValue=8.5,plotpoints=1000]{-3}{3.5}{(x-1)*(x-3)*(x+2)}
\end{pspicture}

\end{document} 
Herbert
Post Reply