![报价曲线乳胶图](https://linux22.com/image/460713/%E6%8A%A5%E4%BB%B7%E6%9B%B2%E7%BA%BF%E4%B9%B3%E8%83%B6%E5%9B%BE.png)
我正在尝试获取典型的 Edgeworth 盒场景中消费者的报价曲线图。
理想的输出是
说实话我根本不知道从哪里开始,所以我很感激任何建议。
我最好的猜测是
\begin{center}
\begin{tikzpicture}
\begin{axis}[
scale = 1.2,
xmin = 0, xmax = 10,
ymin = 0, ymax = 10,
axis lines* = left,
xtick = {0}, ytick = \empty,
clip = false,
]
% Indifference curves
\addplot[domain = 0:10, restrict y to domain = 0:10, samples =
400, color = red]{10/(x^2)+1};
\addplot[domain = 1:10, restrict y to domain = 0:10, samples =
400, color = red]{10/((x-1)^2)+2};
\addplot[domain = 2:10, restrict y to domain = 0:10, samples =
400, color = red]{10/((x-2)^2)+3};
\addplot[domain = 3:10, restrict y to domain = 0:10, samples =
400, color = red]{10/((x-3)^2)+4};
\addplot[domain = 4:10, restrict y to domain = 0:10, samples =
400, color = red]{10/((x-4)^2)+5};
% Budget constraints
\addplot[domain = 0:10, restrict y to domain = 0:10, samples =
400, color = blue, thick]{9.16-1.02*x};
\addplot[domain = 0:10, restrict y to domain = 0:10, samples =
400, color = blue, thick]{9.16-1.59*x};
% Dashed lines
\addplot[color = black, dashed, thick] coordinates {(4.7, 0) (4.7,
4.37) (0, 4.37)};
\addplot[color = black, dashed, thick] coordinates {(3.3, 0) (3.3,
3.9) (0, 3.9)};
% Coordinate points
\addplot[color = black, mark = *, only marks, mark size = 3pt]
coordinates {(3.3, 3.9) (4.7, 4.37)};
% Labels
\node [right] at (current axis.right of origin) {$A$};
\node [above] at (current axis.above origin) {$B$};
\node [above] at (9.1, 0) {$M$};
\node [above] at (6, 0) {$M^\prime$};
\node [below] at (4.7, 0) {$Q_A$};
\node [below] at (3.3, 0) {$Q_A^\prime$};
\node [left] at (0, 4.5) {$Q_B$};
\node [left] at (0, 3.7) {$Q_B^\prime$};
\node [above] at (5.1, 4.2) {$D$};
\node [above] at (2.9, 2.8) {$D^\prime$};
\node [right] at (10, 1.1) {$U_1$};
\node [right] at (10, 2.12) {$U_2$};
\node [right] at (10, 3.16) {$U_3$};
\node [right] at (10, 4.2) {$U_4$};
\node [right] at (10, 5.4) {$U_5$};
\end{axis}
\end{tikzpicture}
\end{center}
但这会产生不同的点 D,而我希望预算线围绕同一点 omega 旋转。
我找到了这个答案中给出的绘制 Edgeworth 盒的方法。帕累托效率的埃奇沃思盒
理想的做法是:遮蔽两条无差异曲线之间的区域;画出预算约束;画出合同曲线。
谢谢!
答案1
我会这么做:
- 加载
decorations.pathreplacing
库。这是用于支架的。 - 放置一些定义直线的点,并使用 Ti钾Z
calc
库和极坐标。这样你就会知道角度,并且可以绘制与线相切的曲线。 - 使用之前定义的角度绘制线条和曲线。
我不知道您想要的阴影面积到底是多少,所以我只是猜测。但无论面积是任何其他的,想法都是一样的。
例如:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{amssymb} % \gtrsim
\usetikzlibrary{calc, % placing the coordinates
decorations.pathreplacing} % brace
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,scale=1.5]
% axes
\draw[stealth-stealth,thick] (0,5) |- node[below] {$O_1$} (6,0);
\draw[stealth-stealth,thick] (-1,4) -| node[above] {$O_2$} (5,-1);
% coordinates (placed with calc libraries and polar coordinates)
%%% for the lines
\coordinate (A) at (3.5,0.8);
\coordinate (B) at ($(A)+(144:2.2)$);
\coordinate (C) at ($(A)+(129:2.4)$);
\coordinate (A1) at ($(A)+(163:4.1)$);
\coordinate (B1) at ($(B)!-2.5cm!(A)$);
\coordinate (C1) at ($(C)!-1.9cm!(A)$);
%%% for the curves
\coordinate (P1) at (3.4,1.3);
\coordinate (P2) at (3.4,1.9);
\coordinate (Q1) at (0.7,4.3);
\coordinate (Q2) at (1.3,4.3);
% straight lines
\draw[blue] (A1) -- ($(A)!-2cm!(A1)$);
\draw[blue] (B1) -- ($(A)!-1.7cm!(B1)$);
\draw[blue] (C1) -- ($(A)!-1.5cm!(C1)$);
% curves
\draw[gray,thick,dashed] (5.5,0.6) node[right] {$OC_1$} to[out=180,in=-17] (A)
to[out=163,in=270,looseness=0.5] (B) to[out=90 ,in=225] (C)
to[out=45 ,in=250] (2.9,4.2) node[above] {$OC_1$};
\draw[thick,teal] (5.5,0.3) to[out=170,in=-17] (A) to[out=163,in=280,looseness=1.3] (0.2,4.3);
\draw[thick,teal] (P1) to[out=170,in=-36] (B) to[out=144,in=280] (Q1);
\draw[thick,teal] (P2) to[out=165,in=-51] (C) to[out=129,in=280] (Q2);
% points
\foreach\i in {A,B,C}
\fill (\i) circle (0.4mm);
\draw[decorate,decoration={brace}] (0.1,4.4) -- (1.4,4.4) node[pos=0.8,above,text width=3cm] {Indifference Curves\\for $\gtrsim_1$};
% shaded area (just guessing)
\fill[red,fill opacity=0.2] (P1) to[out=170,in=-36] (B)
to[out=144,in=280] (Q1) -- (Q2)
to[out=280,in=129] (C) to[out=-51,in=165] (3.4,1.9) -- cycle;
\end{tikzpicture}
\end{document}