使用 tikz-pgf 繪製效用曲線

使用 tikz-pgf 繪製效用曲線

我有 Sharpe (1964) 的這張圖,我想用 tikz-pgf 重新創建它: 效用曲線

我對 tikz-pgf 包很陌生,所以我真的不知道從哪裡開始。我想做一些與圖片類似的事情,但將效用曲線翻轉(以便它們是凸的)。我想包括一個可行的區域(如圖的陰影部分所示),但它不必是那個確切的形狀,並且不需要字母,但如果有字母就很好了。

有誰知道如何開始做這樣的事情?先致謝!

答案1

\documentclass[border=3pt]{standalone}
\makeatletter 
\newcommand*{\bottop}{% from https://tex.stackexchange.com/a/414828/121799
  \mathpalette\@bottop{}%
}
\newcommand*{\@bottop}[2]{%
  % #1: math style
  % #2: unused
  \rlap{$#1\bot\m@th$}% put \bot to the right without moving the current point
  \top
}
\makeatother
\usepackage{tikz}
\usetikzlibrary{positioning,calc}
\begin{document}
\begin{tikzpicture}
 \node[label=right:$F$] (F) at (8.8,4){$\bullet$};
 \node[label=below:$A$] (A) at (4.3,1.6){$\bullet$};
 \node[label=right:$X$] (X) at (11.6,11.8){$\bullet$};
 \node[label=right:$C$] (C) at (10.9,8.3){$\bullet$};
 \node[label=right:$D$] (D) at (10.75,7.9){$\bullet$};
 \node[label=right:$D$] (B) at (10.3,7){$\bullet$};
 \draw[thick] (0,0) -- (0,16) node[left,pos=0.9]{$\sigma_\mathrm{R}$};
 \draw[thick] (0,0) -- (16,0) node[below,pos=0.9]{$E_\mathrm{R}$};
 \draw[thick,fill=gray] (1.3,3.2) to (3.6,7) to[bend right=10] (6.6,10)
 to[bend right=14] (X.center) 
 to[bend left=14] (C.center)
 to[bend left=4] (D.center)
 to[bend left=4] (B.center)
 to[bend left=4] (F.center) 
 to[bend left=24] (A.center) to[bend left=24]  cycle;
 \draw[ultra thick,dashed] (3,0) to[bend left=7] (6,5.6) to[bend left=22] 
 (15,11.2) node[right] {$\bottop$};
 \draw[ultra thick,dashed] (6.5,0) to[bend left=7] (F) to[bend left=22] 
 (15,8.2) node[right] {$\bottop\!\!\bottop$};
 \draw[ultra thick,dashed] (9.7,0) to[bend left=17] 
 (15,5.2) node[right] {$\bottop\!\!\bottop\!\!\bottop$};
 \draw[thick,latex-] (B.center) -- (B|-C) node[label=left:$Z$](Z){$\bullet$};
 \draw[thick,-latex] (Z.center) -- (C.center);
 \draw[thick,-latex] (Z.center) -- (D.center);
\end{tikzpicture} 
\end{document}

在此輸入影像描述

相關內容