我正在尝试制作下图:
我如何才能找到 Δ(c2) 的锚点结束和 Δ(c1) 的起始点?有没有办法命名它,或者我应该通过反复试验编号来尝试?
我的代码:
\begin{tikzpicture}
\draw[very thick, ->] (0,0)--(0,4) node[left]{$c_2$};
\draw[very thick, ->](0,0)--(4,0) node[below]{$c_1$};
\draw[thick, -](3.5,0) node[above right]{BC}--(0,3.5);
\draw[thick, color=blue, domain=0.8:4] plot (\x,{(3.1)/(\x)}) node[right]{IC};
\fill (1.7,1.8) circle (2pt);
\fill (1.25,2.5) circle (2pt);
\draw[dashed] (0,1.8) node[left]{$c_2^1$}--(1.7,1.8) node[above right](b){B};
\draw[dashed] (1.7,0) node[below]{$c_1^1$}--(1.7,1.8);
\draw[dashed] (0,2.5) node[left]{$c_2^2$}--(1.25,2.5) node[above right](a){A};
\draw[dashed] (1.25,0) node[below]{$c_1^2$}--(1.25,2.5);
\end{tikzpicture}
答案1
与提议不完全相同daleif
,但类似。
一旦nodes
定义了 A 和 B,所需的交点就在(A|-B)
坐标处。然后就很容易绘制所需的括号了。
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning, decorations.pathreplacing}
\usepackage{lmodern}
\begin{document}
\begin{tikzpicture}[axis/.style={very thick, ->},
dot/.style={circle, minimum size=4pt, inner sep=0pt, fill=black, label={45:#1}},
mybrace/.style={decorate, decoration={brace, mirror, raise=3pt}}]
\draw[axis] (0,0) coordinate (origin) --(0,4) node[left]{$c_2$};
\draw[axis](0,0)--(4,0) node[below]{$c_1$};
\draw[thick, -](3.5,0) node[above right]{BC}--(0,3.5);
\draw[thick, color=blue, domain=0.8:4] plot (\x,{(3.1)/(\x)}) node[right]{IC};
\node[dot=B] at (1.7,1.8) (B) {};
\node[dot=A] at (1.25,2.5) (A) {};
\draw[dashed] (origin|-A) node[left]{$c_2^2$} -| (origin-|A) node[below] {$c_1^2$};
\draw[dashed] (origin|-B) node[left]{$c_2^1$} -| (origin-|B) node[below] {$c_1^1$};
\draw[mybrace, red] (A.center) -- node[red, left=1mm, font=\tiny] {$\Delta(c2)$} (A|-B);
\draw[mybrace, red] (A|-B) -- node[red, below=1mm, font=\tiny] {$\Delta(c1)$} (B.center);
\end{tikzpicture}
\end{document}