早上好,我正在尝试重现以下图片以插入到我的课程中:
但我不知道如何获得虚线面积。这是我的轴代码:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[holdot/.style={circle,draw,fill=white,inner sep=1.5pt}]
\draw[help lines, color=gray, dashed] (-4,-3) grid (4,3);
\draw[->,ultra thick] (-4,0)--(4,0) node[right]{$x$};
\draw[->,ultra thick] (0,-3)--(0,3) node[above]{$y$};
\draw[thick,red,domain=-1.42:1.42,samples=200] (0.5,2) node[anchor=north west] {$\mathcal{C}_{f}$} plot(\x,{\x^3});
\draw [-, green,thick] (2,0) -- (2,3);
\end{tikzpicture}
\end{document}