你能看出弯曲的箭头吗?有什么方法可以让它更优雅吗?现在箭头覆盖了曲线部分的一部分。一个想法是在曲线前后插入两条短水平线。
平均能量损失
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[
N/.style = {minimum height=3ex, minimum width=4.8ex, text depth=0.25ex,inner ysep=6pt},
shorten <>/.style = {shorten > = #1, shorten <=#1}
]
\node (cold_in) [N, right] at (5,0) {$T_{C,L}$};
\node (cold_out) [N, left] at (0,0) {$T_0$};
\draw[gray, shorten <>=3mm] (cold_out.north east) -- (cold_in.north west);
\draw[red, shorten <>=3mm] (cold_out.south east) -- (cold_in.south west);
\draw[-Straight Barb,dotted] (cold_in) -- (cold_out);
\node (hot_in) [N,left,anchor=north] at (cold_out.south) {$T_{0}$};
\node (hot_out) [N,right,anchor=north] at (cold_in.south) {$T_{L}$};
\draw[-Straight Barb,dotted] (hot_in) -- (hot_out);
\draw[gray, shorten <>=3mm] (hot_in.south east) -- (hot_out.south west);
\draw[-Straight Barb,dotted] (cold_out.west) to[out=180,in=180] (hot_in.west);
\end{tikzpicture}
\end{figure}
\end{document}
答案1
答案2
您选择的箭头在紧密弯曲的线上看起来不太好看。您的想法很容易应用,只需在线上添加直线项即可:
\draw[-Straight Barb,dotted] (cold_out.west) -- ++(-0.1,0) coordinate(tmp) to[out=180,in=180] (tmp|-hot_in.west) -- (hot_in.west);
另一个选择是更改箭头并添加bending
库
\usetikzlibrary{bending}
...
\draw[-{Triangle[length=2mm,bend]},dotted] (cold_out.west) to[out=180,in=180] (hot_in.west);
答案3
答案4
使用负值的“缩短”并改变箭头即可起作用。
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[
N/.style = {minimum height=3ex, minimum width=4.8ex, text depth=0.25ex,inner ysep=6pt},
shorten <>/.style = {shorten > = #1, shorten <=#1}
]
\node (cold_in) [N, right] at (5,0) {$T_{C,L}$};
\node (cold_out) [N, left] at (0,0) {$T_0$};
\draw[gray, shorten <>=3mm] (cold_out.north east) -- (cold_in.north west);
\draw[red, shorten <>=3mm] (cold_out.south east) -- (cold_in.south west);
\draw[-Straight Barb,-stealth,dotted] (cold_in) -- (cold_out);
\node (hot_in) [N,left,anchor=north] at (cold_out.south) {$T_{0}$};
\node (hot_out) [N,right,anchor=north] at (cold_in.south) {$T_{L}$};
\draw[-Straight Barb,-stealth,dotted] (hot_in) -- (hot_out);
\draw[gray, shorten <>=3mm] (hot_in.south east) -- (hot_out.south west);
\draw[-Straight Barb,-stealth,dotted,shorten >=-5pt] (cold_out.west) to[out=180,in=180] (hot_in.west);
\end{tikzpicture}
\end{figure}
\end{document}