在 TikZ 中绘制平滑双曲曲线

在 TikZ 中绘制平滑双曲曲线

我正在尝试使用 TikZ 绘制下图。但是似乎无法获得图中所示的正确平滑度。

在此处输入图片描述

有人能告诉我如何实现吗?到目前为止,我尝试的是使用parabola函数和smooth图。

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}

\draw [<->,thick] (0,5) node (yaxis) [above, text width=3.5cm,align=center] {$s_1$}
        |- (7,0) node (xaxis) [right] {$s_2$};

\coordinate (A) at (2.5,4.7);
\coordinate (B) at (2.80,2.0);
\coordinate (C) at (3.75,1.50);
\coordinate (D) at (6.7,0.75);

%\draw[thick] plot [smooth] coordinates{(A) (B) (C) (D)};
% \draw (2.5,4.7) parabola bend (2  .8,2) (6.7,0.75);
\draw  (6.7,1.00) parabola bend (3.5,0.95) (2.5,4.7) ;

\node [yshift=0.25cm] at (A) {$T = C$};
\node [xshift=0.65cm] at (D) {$c_1/\psi$};

\draw[dotted] (0,4.5) node[xshift=-8pt] {$n_1$} -- (6.5,4.5);
\draw[dotted] (6.5,4.5) -- (6.5,0) node[yshift=-8pt] {$n_2$};


%\draw[dotted] (0,0.9) node[xshift=-8pt] {$1$} -- (4.5,0.9);
\draw[dotted] (1.5,4.5) -- (1.5,0) node[yshift=-8pt] {$I_1/\psi$};

\node[text width=2.5cm,align=center] at (3,0.75) {Transfer domain \\ $T > C$};
\node[text width=4cm,align=center] at (4.75,3.5) {Computation domain \\ $T < C$};

\end{tikzpicture}
\end{document}

答案1

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}

\draw [<->,thick] (0,5) node (yaxis) [above, text width=3.5cm,align=center] {$s_1$}
        |- (7,0) node (xaxis) [right] {$s_2$};

\coordinate (A) at (2.5,4.7);
\coordinate (B) at (2.80,2.0);
\coordinate (C) at (3.75,1.50);
\coordinate (D) at (6.7,0.75);

%\draw[thick] plot [smooth] coordinates{(A) (B) (C) (D)};
% \draw (2.5,4.7) parabola bend (2  .8,2) (6.7,0.75);
\draw (6.7,1.00) .. controls (3,1.7) and (2.4,1.7) .. (2.5,4.7) ;

\node [yshift=0.25cm] at (A) {$T = C$};
\node [xshift=0.65cm] at (D) {$c_1/\psi$};

\draw[dotted] (0,4.5) node[xshift=-8pt] {$n_1$} -- (6.5,4.5);
\draw[dotted] (6.5,4.5) -- (6.5,0) node[yshift=-8pt] {$n_2$};


%\draw[dotted] (0,0.9) node[xshift=-8pt] {$1$} -- (4.5,0.9);
\draw[dotted] (1.5,4.5) -- (1.5,0) node[yshift=-8pt] {$I_1/\psi$};

\node[text width=2.5cm,align=center] at (3,0.75) {Transfer domain \\ $T > C$};
\node[text width=4cm,align=center] at (4.75,3.5) {Computation domain \\ $T < C$};

\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

今天,人们可以通过 TikZ (v 3.0.1a) 以以下(相对简洁的)方式绘制此图像:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{positioning}

\begin{document}
    \begin{tikzpicture}[
node distance = 3mm and 5mm,
   box/.style = {inner sep=0pt, text width=22mm,align=flush center}
                        ]
% axis
\draw [->,thick] (-0.1,0) -- + (7,0) node[right] {$s_2$};
\draw [->,thick] (0,-0.1) -- + (0,6) node[above] {$s_1$};
% 
\coordinate[label=left:$n_1$]       (A) at (0.0,4.5);
\coordinate[label=below:$I_1/\psi$] (B) at (0.9,0.0);
\coordinate[label=below:$n_2$]      (C) at (6.2,0.0);
% hyperbola with nodes on the both ends
\node[above,orange] at (1.75,5.0) {$T = C$};
\draw[ultra thick,orange] plot[domain=.25:5,smooth]   (1.5+\x,1+1/\x)
      node[right] {$c_1/\psi$};
% dotted lines
\draw[dotted] (A) -| (B)    (A -| B) -| (C);
%
\node[box,above right=of B]     {Transfer domain\\ $T > C$};
\node[box,below left=of A -| C] {Computation domain\\ $T < C$};
    \end{tikzpicture}
\end{document}

对于双曲线,选择函数 1/X在域 0.25:5 上并移至 (1.5,1)。为了好看,双曲线是橙色的 :-) :

在此处输入图片描述

相关内容