答案1
这是一个随机的解决方案(每次编译都会给出不同的曲线):
\documentclass[tikz]{standalone}
\pgfmathsetseed{\pdfuniformdeviate 1000000}
\begin{document}
\begin{tikzpicture}
% lab style
\tikzset{lab/.style={text=black}}
% draw axis
\draw[gray!50] (0,0) node[below,lab]{$0$}
-- (11,0) node[below,lab]{$L-1$} node[above,lab]{Intensity}
(0,0) -- (0,5) node[above,lab]{Number of pixels};
% random Tc and Xa
\coordinate (Tc) at (0,rnd+2);
\coordinate (Xa) at (rnd*4+3,0);
% draw lines
\draw (Tc) -- (Tc -| 10,0) node[above]{$T_c$};
\draw[dashed] (Xa) node[below]{$X_a$} node[above left]{Under Exposed}
node[above right]{Over Exposed} -- (Xa |- 0,5);
% random curve
\draw[rounded corners=5mm,thick]
(0,0) \foreach \p in {1,...,9}{ -- (\p, rnd*4+.5) } -- (10,0);
\end{tikzpicture}
\end{document}
答案2
看一下 pgfplots。手动的非常好,有很多例子。如果你想要更具体的答案,你必须提供数据和 mwe。