
\definecolor{yqqqyq}{rgb}{0.5019607843137255,0.,0.5019607843137255}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{axis}[
x=1.0cm,y=1.0cm,
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-4.579999999999999,
xmax=2.9999999999999987,
ymin=-2.6199999999999983,
ymax=3.5599999999999987,
xtick={-4.0,-3.0,...,3.0},
ytick={-2.0,-1.0,...,3.0},]
\clip(-4.58,-2.62) rectangle (3.,3.56);

\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.2pt,domain=-4.0:-2.0)] plot (\x,{(0.125*(\x)^3+0.5*(\x)^2+0.5*(\x)+3.0)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.2pt,domain=-2.0:0.0)] plot (\x,{(-0.125*(\x)^3+-1.0*(\x)^2+-2.5*(\x)+1.0)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.2pt,domain=0.0:1.0)] plot (\x,{(3.5*(\x)^3+-4.0*(\x)^2+-2.5*(\x)+1.0)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.2pt,domain=1.0:2.0)] plot (\x,{(3.25*(\x)^3+-9.0*(\x)^2+8.25*(\x)+-4.5)/1.0}););
\draw [line width=0.5pt,dash pattern=on 2pt off 2pt] (-4.,1.)-- (-4.,0.);
\draw [line width=0.5pt,dash pattern=on 2pt off 2pt] (-2.,3.)-- (-2.,0.);
\draw [line width=0.5pt,dash pattern=on 2pt off 2pt] (1.,0.)-- (1.,-2.);
\draw [line width=0.5pt,dash pattern=on 2pt off 2pt] (2.,0.)-- (2.,2.);
\begin{scriptsize}
\draw [color=black] (-4.,1.)-- ++(-1.5pt,0 pt) -- ++(3.0pt,0 pt) ++(-1.5pt,-1.5pt) -- ++(0 pt,3.0pt);
\draw [color=black] (-2.,3.)-- ++(-1.5pt,0 pt) -- ++(3.0pt,0 pt) ++(-1.5pt,-1.5pt) -- ++(0 pt,3.0pt);
\draw [color=black] (0.,1.)-- ++(-1.0pt,0 pt) -- ++(2.0pt,0 pt) ++(-1.0pt,-1.0pt) -- ++(0 pt,2.0pt);
\draw [color=black] (1.,-2.)-- ++(-1.5pt,0 pt) -- ++(3.0pt,0 pt) ++(-1.5pt,-1.5pt) -- ++(0 pt,3.0pt);
\draw [color=black] (2.,2.)-- ++(-1.5pt,0 pt) -- ++(3.0pt,0 pt) ++(-1.5pt,-1.5pt) -- ++(0 pt,3.0pt);
\end{scriptsize}
\end{axis}
\end{tikzpicture}
