HI Hans,
Sorry, I forgot
\usemodule[pgfplots]
\pgfplotsset{compat=1.13}
\usetikzlibrary[intersections]
\usepgfplotslibrary[fillbetween]
\starttext
\starttikzpicture[/pgf/declare function={f(\x)=(1/8)*(\x^3-2.5*\x^2-3*\x+4.5);},]
\switchtobodyfont[8pt]
\startaxis
[restrict x to domain=-3:5, xmax=5, xmin=-3,
restrict y to domain=-3:3, ymax=3, ymin=-3,
x=2cm,
y=2cm,
axis lines=center,
axis line style =ultra thick,
major tick style=black,
xtick={-2,-1,...,4},
ytick={-2,-1,...,2},
yticklabels={,,},
xticklabels={,,},
extra x ticks={-3,5},
extra x tick label={\null},
extra y ticks={-3,3},
extra y tick label={\null},
extra tick style={tick style={draw=none}},
xlabel=$x$,ylabel=$y$,
every axis x label/.style={
at={(ticklabel* cs:1.01)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.01)},
anchor=south,
},
samples=1000,
>=stealth]
\addplot[smooth,
draw=none,
tension=0.6,
name path=plot]
coordinates{
(-2,-2.5) (-1.5,0)(-1,1.5) (-0.5,2)
(0,1.5) (1,0) (2,-0.5)
(3,0) (4,1.5)
};
\path[name path=cut line] (-2,1.5) -- (4,1.5);
\draw[thick,intersection segments={of=plot and cut line,sequence=L1}];
\draw[thick,intersection segments={of=plot and cut line,sequence=L2}];
\draw[thick, intersection segments={of=plot and cut line,sequence=L3}];
\node[fill=black,circle,scale=0.4] at (-2,-2.5){};
\node[fill=black,circle,scale=0.4] at (4,1.5){};
\node[below] at (-1.5,-1.5) {\math{{\cal C}_f}};
\node[below] at (1,0) {1};
\node[left] at (0,1) {1};
\node[below left] at (0,0) {0};
\stopaxis
\stoptikzpicture
\stoptext