答案1
没有鲑鱼。(不过,使用 pgfplots 会更直接。)
\documentclass[border=3.14mm,tikz,x11names,dvipsnames,svgnames]{standalone}
\usetikzlibrary{patterns}
\tikzset{declare function={f(\x)=sqrt(1/\x);}}
\begin{document}
\begin{tikzpicture}
\draw [latex-latex] (0,6) -- (0,0) -- (6,0);
\draw[blue,thick] plot[samples=50,variable=\x,domain=0.04:5,smooth]
({\x+0.2},{f(\x)});
\path[pattern=north east lines] (0,0) -- (0,5) -- (0.24,5) --
plot[samples=50,variable=\x,domain=0.2:5,smooth]
({\x+0.2},{f(\x)}) -- (5.2,0) -- cycle;
\node (SF) at (2.5,2.5) {$S_F$};
\draw[-latex] (SF) to[out=-160,in=70] ++(-2,-2);
\node[anchor=west] at (5.3,0.4) {$F(x)$};
\end{tikzpicture}
\end{document}
current_user:我正在并行工作;在我的示例中,模式线并不跨越函数。
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{arrows,patterns}
\begin{document}
\begin{tikzpicture}[every node/.style={font=\footnotesize}]
\fill[pattern color=black!70,scale=.5,domain=.2:5.5,smooth,pattern=north west lines] (0,0) -- (0,5) -- (.2,5) -- plot ({\x},{1/\x}) -- (5.5,0) -- cycle;
\draw[scale=.5,domain=.18:5.5,smooth,red] plot ({\x},{1/\x});
\draw[>=latex,->] (-.5,0) -- (3,0) node[above] {$F(x)$};
\draw[>=latex,->] (0,-.5) -- (0,3);
\node (a) at (1.5,1) {$S_F$};
\draw[thick,->] (a) to[bend right] (.3,.3);
\end{tikzpicture}
\end{document}
附言:我在图案顶部和函数之间留了一点空间(如图所示)。