请问我该如何使用 tikz 重现这张图片。我尝试从 GeoGebra 导出它,但它不能让我满意。
\begin{tikzpicture}
% Axes
\draw[->] (-1.5,0) -- (2.5,0);
\draw[->] (0,-1) -- (0,2);
% Axes labels
\node[below] at (2.5,0) {$x$};
\node[left] at (0,2) {$y$};
% Fonction
\draw[line width=1pt] plot[domain=-1.5:2.5,samples=50] function{x^2};
% Points
\draw[red] (-1.5,2.25) -- (-1.5,0);
\draw[red] (1.5,2.25) -- (1.5,0);
\draw[red] (0,0) -- (0,2);
% Texte
\node[red] at (-1.5,2.25) {$a$};
\node[red] at (1.5,2.25) {$a$};
\node[red] at (0,2) {$D$};
% Unité
\draw[black,dashed] (-0.75,-0.2) -- (-0.75,0.2);
\node[black] at (-0.75,0) {1};
\end{tikzpicture}