- #1

karush

Gold Member

MHB

- 3,269

- 5

spent about an hour trying to find a useable example but didn't

i am new to tikz but this is not a function...

here is the code I tried. just borrowed a previos on i thot I could just replace the expression but no

\begin{tikzpicture}

%preamble \usepackage{pgfplots}

\begin{axis}[xmin=-1.8, xmax=1.8, ymin=-3, ymax=3, axis lines=middle, ticks=none]

\addplot[

draw=red, smooth, ultra thick, dashed,

domain=-1.5:1.5,

smooth

]{-x-x^3+2}

%{y^3−3y^2−x−x^3+2=0}

\foreach \x in {-1,0,1} { (axis cs:{\x},0) node[below right] {\x} };

\end{axis}

\end{tikzpicture}