答案1
我只会画出单独的情节。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{arrows.meta,bending,decorations.text}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}[circ/.style={circle,draw,inner sep=2pt}]
\begin{axis}[
axis lines = center,
xmin=-4.5,
xmax=6.5,ymin=-2,
%xtick=\empty,ytick=\empty,
xlabel={$x$},ylabel={$y$},
minor tick num=4,
grid=both,
every tick label/.style={opacity=0},
]
\addplot [cyan,smooth,{Stealth[bend]}-,domain=-4:2,
postaction={decoration={text along path,text align={align=center},
text={|\color{cyan}|{$y$}{${}={}$}{${x^2}$}},raise=-2.5ex,},decorate}]{x*x}
node[pos=1,circ,fill=white]{};
\path (2,6) node[circ,fill=green!60]{};
\addplot[cyan,samples=2,domain=2:6] {10-x}
node[pos=0,circ,fill=white]{}
node[pos=0.5,above,sloped]{$y=10-x$}
node[pos=1,circ,fill=green!60]{};
\end{axis}
\end{tikzpicture}
\end{document}