改进弓箭

改进弓箭

你能看出弯曲的箭头吗?有什么方法可以让它更优雅吗?现在箭头覆盖了曲线部分的一部分。一个想法是在曲线前后插入两条短水平线。

平均能量损失

\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

您可以添加looseness=您的选项:

\draw[-Straight Barb,dotted, looseness=2] (cold_out.west) to[out=180,in=180] (hot_in.west);

不需要整数,例如,您可以尝试1.8(更严格)或2.25(更宽松)。您可能还想考虑densely dotted而不是dotted

在此处输入图片描述

答案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

更改你的代码行

\draw[-Straight Barb,-stealth,dotted,shorten >=-5pt] (cold_out.west) to[out=180,in=180] (hot_in.west);

用这个:

\draw[-latex,dotted,line width=1pt] (cold_out.west) arc (90:270:.4);

输出将是:

在此处输入图片描述

答案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}

在此处输入图片描述

相关内容