答案1
\documentclass[tikz, border=20]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=\(x\),
ylabel=\(y\),
xmin=-7,
xmax=7,
ymin=-30,
ymax=30,
grid=major,
grid style={solid},
samples=100
]
\foreach \a in {-2.4, -2.1, ..., 2.4} {
\addplot[
domain=-7:7,
red,
dashed
] expression{2*\a*x^2 + 12*x};
\addplot[
domain=-7:7,
cyan
]
expression{2*\a*x^2 - 12*x};
}
\end{axis}
\end{tikzpicture}
\end{document}