我想在 PSTricks 中用颜色填充贝塞尔曲线和线条下方的区域。我该怎么做?
这是我迄今为止尝试过的:
\begin{pspicture}(20,25)(160,80)
\psline[linewidth=0.55]{|->}(20,30)(160,30)
\psbezier(90,30)(90,30)(90,30)(90,30)
\rput(90,25){$\rho_i^A$}
\psbezier(125,30)(125,30)(125,30)(125,30)
\psbezier(55,30)(55,30)(55,30)(55,30)
\rput(55,25){$\rho_0$}
\rput(125,25){$p_HR$}
\psline[linestyle=dotted](90,80)(90,25)
\psline[linestyle=dotted](125,80)(125,25)
\psline[linestyle=dotted](55,80)(55,25)
\rput(160,25){$\rho_i$}
\psline(20,50)(55,50)
\psline(125,70)(160,70)
\pscustom[]{\psbezier(55,50)(65.5,50)(73,51.5)(80,55)
\psbezier(87,58.5)(90,60)(90,60)
}
\psbezier(90,60)(100.5,67)(111,70)(125,70)
\rput(20,25){$0$}
\end{pspicture}
答案1
\documentclass{article}
\usepackage{pstricks}
\usepackage{xcolor}
\begin{document}
\psset{unit=1mm}
\begin{pspicture}(20,25)(160,80)
\psline[linewidth=0.55]{|->}(20,30)(160,30)
\rput(90,25){$\rho_i^A$}
\rput(55,25){$\rho_0$}
\rput(125,25){$p_HR$}
\psline[linestyle=dotted](90,80)(90,25)
\psline[linestyle=dotted](125,80)(125,25)
\psline[linestyle=dotted](55,80)(55,25)
\rput(160,25){$\rho_i$}
\pscustom[fillstyle=solid,fillcolor=blue!60,opacity=0.5,linestyle=none]{%
\psline(20,30)(20,50)(55,50)
\psbezier(65.5,50)(73,51.5)(80,55)
\psbezier(87,58.5)(90,60)(90,60)
\psbezier(100.5,67)(111,70)(125,70)
\psline(160,70)(160,30)
}
\psset{linecolor=blue,linewidth=1.5pt}
\psline(20,50)(55,50)
\psbezier(55,50)(65.5,50)(73,51.5)(80,55)
\psbezier(80,55)(87,58.5)(90,60)(90,60)
\psbezier(90,60)(100.5,67)(111,70)(125,70)
\psline(125,70)(160,70)
\rput(20,25){$0$}
\end{pspicture}
\end{document}