如何绘制一个圆形“弧形”双距箭头,并在双距线之间带有图形的提示和文字?

如何绘制一个圆形“弧形”双距箭头,并在双距线之间带有图形的提示和文字?

在绘制圆形双距箭头时,我对箭头尖端的位置有疑问。问题似乎是是否使用了库弯曲。如果不是,则部分正确定位了尖端,但宽度选项存在问题(为什么要使用不同的宽度。这是行不通的)并且日历年 1 和 2 中的弧线不同。非常令人困惑,看不到解决方案。此外,我找不到一种方法将箭头中放置不当的文本装饰与箭头结合起来。这是可行的方法吗?我得到的都是语法错误。希望我能把这个想法说清楚:

  1. 正确形成带有尖端的箭头(应该可以打开和填充)。
  2. 所提及的箭头中的“基线”文本。
  3. 在添加的文本中使用附加图形,例如弯曲箭头(此处由 -----> 伪造)

任何可能完全不同的解决这个问题的想法都将非常感激!

    \documentclass[]{article}
    \usepackage{tikz}
    \usetikzlibrary{
                    % bending, % for arrows. 
                    calc,
                    arrows.meta, % for the tip in skorpio
                    decorations,
                    decorations.pathreplacing,
                    decorations.pathmorphing,
                    decorations.text,
                    decorations.markings, % arrow tips on a circle
                   }
    \usepackage[paperheight=160mm,
                paperwidth=180mm,
                top=5mm,
                bottom=5mm,
                left=5mm,
                right=5mm,
                %showframe
               ]{geometry}
    \begin{document}
    
    \def\radiustropy{35mm} % tropical year radius 
    \begin{tikzpicture}
    \tikzset{shape ty/.style= {color = black!30,
                               draw,
                               %fill = yellow!30,
                               line width = 1pt,
                               inner xsep = 2.5cm,
                               inner ysep = 0.5cm},
            }% end tikzset shape ty
    \node[name=ty,shape=circle,shape ty] {Circle\vrule width 1pt height 2cm};
    
    
    % to cover the edge of ty (future use)
    \node[draw,blue,, line width=3mm,name=c,shape=circle,minimum size=\radiustropy*2-3mm] at (ty.center){};
    
    
    % 
    %tropical year, full circle
    \draw [->,draw=red!10!black!60!white,,
            double distance=1ex,
            line width=1pt,
            -{Stealth[width=10pt,red!10!black!60!white,open,scale=1.0]}
            % doesn't work % % arrows={Stealth[red!10!black!60!white,open,bend,scale=1.0]}
    ]%% 
    (0:\radiustropy) arc [start angle=0, end angle=360, radius=\radiustropy];
    
    % text, long, up to halfcircle       
    \path%
    [%
     postaction={decorate,%
                  decoration={raise=-1pt,%
                  text along path, %
                  text format delimiters={[}{]},
                  text={[\tiny]A tropical year lasts 365 days, 5 hours 48 minutes und 45.2 seconds and begins and ends here -----------> [] },
                  text align={align=center}
                             }%
                 }%
    ]
    (-\radiustropy,0) arc (180:0:\radiustropy);    
    
    \path [,postaction={decorate,decoration={raise=-3pt,text along path,%
                  text format delimiters={[}{]},
                  text={[\tiny]A tropical year lasts 365 days, 5 hours 48 minutes und 45.2 seconds [] },
    %reverse path,
     text align={align=}
    }}](180:\radiustropy) arc (-180:0:\radiustropy);             
    
    
    
    
    % first calendar year
    
    \draw [->,draw=red!30!black!40!white,
            -{Stealth[red!30!black!40!white,open,scale=1.0]}
    ]%
    (0,0) -- (350:\radiustropy+17); %
    
    
    % help to set begin of second year
    \node[inner sep=0,draw,blue,,name=bsy,circle,minimum size=.3pt]at(4.038,-0.713){};
    
    
    \draw [->,draw=red!30!black!40!white,,
            double distance=1.5ex,
            line width=1pt,
            -{Stealth[width=12pt,red!30!black!40!white,open,scale=1.0]}
    ]%% 
    (0:\radiustropy+2.5mm) arc [start angle=0, end angle=350, radius=\radiustropy+2.5mm];
    
    % text, long, up to halfcircle       
    \draw%
    [%
     postaction={decorate,%
                  decoration={raise=-1.5pt,%
                  text along path, %
                  text format delimiters={[}{]},
                  text={[\tiny]A calendar year lasts 365 days [] },
                  %reverse path,
                  text align={align=center}
                             }%
                 }%
    ]
    (-\radiustropy-2.5mm,0) arc (180:0:\radiustropy+2.5mm);    
    
    \draw [,postaction={decorate,decoration={raise=-1.5pt,text along path,%
                  text format delimiters={[}{]},
                  text={[\tiny]First calendar year, 5 hours 48 minutes und 45.2 seconds too less [] },
     text align={align=}
    }}](180:\radiustropy+2.5mm) arc (-180:0:\radiustropy+2.5mm);             
    
     
    
    % second calendar year
    
     \draw [->,draw=red!60!black!20!white,
            -{Stealth[red!60!black!40!white,open,scale=1.0]}
    ]%
    (0,0) -- (340:\radiustropy+17);
    
    
    \draw [->,draw=red!60!black!20!white,,
            double distance=1.5ex,
            line width=1pt,
            -{Stealth[width=13pt,red!60!black!20!white,open,scale=1.0]}
    ]%% 
    %(4.038,-0.713) 
    (bsy) arc [start angle=-10, end angle=340, radius=\radiustropy+6mm];
    % text, long, up to halfcircle       
    \draw%
    [%
     postaction={decorate,%
                  decoration={raise=-1.5pt,%
                  text along path, %
                  text format delimiters={[}{]},
                  text={[\tiny]Some comment about tje second year e.g. dec values of the hours [] },
                  %reverse path,
                  text align={align=center}
                             }%
                 }%
    ]
    (-\radiustropy-6mm,0) arc (180:0:\radiustropy+6mm);    
    
    \draw [,postaction={decorate,decoration={raise=-1.5pt,text along path,%
                  text format delimiters={[}{]},
                  text={[\tiny]Second calendar year, 10 hours 96 minutes und 90.4 seconds too less [] },
    %reverse path,
     text align={align=}
    }}](180:\radiustropy+6mm) arc (-180:0:\radiustropy+6mm);             
    
     
    % a grid
    \draw[step=.1cm,gray!50!white,very thin] (0,-1) grid (5,5);
    \draw[step=1cm,black!40!red, very thin,opacity=0.4] (0,-1) grid (5,5);
    \foreach \x/\xtext in {0,4,5}
       \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {\tiny$\xtext$};
    \foreach \y/\ytext in {1,5}
       \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {\tiny$\ytext$};
    % end grid
    \end{tikzpicture}
    
    \end{document}
    

在此处输入图片描述

答案1

没有你的专业知识我就能解决

  1. 圆弧的偏差,-消除
  2. 箭头中带有变音符号的文本(像 2 天 3 小时 4 分钟这样的 SI 单位不可能吗?)
  3. 箭头的正确定位(通过图片)

这个解决方案是一种基本方法,但通过手工操作可以满足要求。

母语:

    \documentclass[]{article}
    \usepackage{tikz}
    \usetikzlibrary{
            % bending, % for arrows. 
            calc,
            arrows.meta, % for the tip in skorpio
            decorations,
            decorations.pathreplacing,
            decorations.pathmorphing,
         decorations.text,
            decorations.markings, % arrow tips on a circle
           }
    \usepackage[paperheight=160mm,
        paperwidth=180mm,
        top=5mm,
        bottom=5mm,
        left=5mm,
        right=5mm,
        %showframe
       ]{geometry}

    %\input{/home/hj/latex/mwes/pics/arrowtip/inparrowtip.tex}

    % def of an arrow tip
    %\draw[yshift=-0.1,rotate=45,scale=0.5,blue,line width=0.1,fill=green] (0,0) -- (0.15,-0.4)
    %                                       -- (0,-0.3)
    %                                       -- (-0.15,-0.4) -- cycle
    %;
    \tikzset{pics/atip/%
     .style n args={6}{
           code={
                 \draw[#1,#2,#3,#4,#5,#6] 
                      (0,0) -- (0.18,-0.45)
                            -- (0,-0.3)
                            -- (-0.18,-0.45) -- cycle
                 ;
                  }%end code
                  },%end pic
    }%end tikzset
    \begin{document}

    \def\radiustropy{35mm} % tropical year radius 
    \begin{tikzpicture}
    \tikzset{shape ty/.style= {color = black!30,
                       draw,
                       %fill = yellow!30,
                       line width = 1pt,
                       inner xsep = 2.5cm,
                       inner ysep = 0.5cm},
    }% end tikzset shape ty
    \node[name=ty,shape=circle,shape ty] {Circle\vrule width 1pt height 2cm};


    % to cover the edge of ty (future use)
    \node[draw,blue,, line width=3mm,name=c,shape=circle,minimum size=\radiustropy*2-3mm] at (ty.center){};


    % 
    %tropical year, full circle
    %
    % rotate=-6.1 atip1
    \pic at (0:\radiustropy+0.75ex) {atip={yshift=-0.5}{rotate=-5}{scale=1.00}{black!75}{line width=0.4}{fill=white!100!black!75}};
 
    % border of circled info text 1i
    % start line
    \draw[,black,line width=0.4,] (\radiustropy-0,0) -- (\radiustropy+1.5ex,0);      
    \draw[,black,line width=0.4,] (\radiustropy-0,0) arc (0:353:\radiustropy-0);      
    % border of circled info text 1a
    \draw[,black,line width=0.4,] (\radiustropy+1.5ex,0) arc (0:354:\radiustropy+1.5ex);
    \path%
    [%
     postaction={decorate,%
          decoration={raise=1.35pt,%
          text along path, %
          text format delimiters={[}{]},
          text={[\tiny]TJ1 u. KJ1 beginnen synchron [] },
          %reverse path,
          text align={align=center}
                     }%
         }%
    ]
    (-\radiustropy,0) arc (180:0:\radiustropy);    

    \path [,postaction={decorate,decoration={raise=-4.6pt,text along path,%
          text format delimiters={[}{]},
          text={[\tiny]KJ1 endet 5,8125 Std zu fr{\"u}h [] },
     text align={align=}
    }}](180:\radiustropy) arc (-180:0:\radiustropy);             

    %%%%%%%%%%%%%%%%%%%%%%
    % second calendar year
    %
    \draw [->,draw=red!30!black!40!white,
    -{Stealth[red!30!black!40!white,open,scale=1.0]}
    ]%
    (0,0) -- (350:\radiustropy+7mm); %
    % help to set begin of second year
    \draw [] (3.95,-0.695) -- (4.038,-0.713) -- (4.126,-0.73); %

    \draw [->,draw=red!30!black!40!white,
    -{Stealth[red!30!black!40!white,open,scale=1.0]}
  ]%
       (0,0) -- (343:\radiustropy+5mm); % 
    % second year
    
    \pic at (350:\radiustropy+6.0mm) {atip={yshift=-0.5}{rotate=-10.0}{scale=1.00}{black!75}{line width=0.4}{fill=white!100!black!75}};
 
 
    % border of circled info text 2i
    \draw[,black,line width=0.4,] (3.95,-0.695) arc (-10:344:\radiustropy+5mm);      
    % border of circled info text 2a
    \draw[,black,line width=0.4,] (4.126,-0.73) arc (-10:345:\radiustropy+7.15mm);
    \path%
    [%
     postaction={decorate,%
          decoration={raise=0.00pt,%
          text along path, %
          text format delimiters={[}{]},
          text={[\tiny]TJ1 u. KJ1 beguuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuinnen synchron [] },
          %reverse path,
          text align={align=center}
                     }%
         }%
    ]
    (-\radiustropy-5.5mm,0) arc (180:0:\radiustropy+5.5mm);    

    \path [,postaction={decorate,decoration={raise=-3.3pt,text along path,%
          text format delimiters={[}{]},
          text={[\tiny]KJ1 endet 10,8125 Std zu fr{\"u}h [] },
     text align={align=}
    }}](-\radiustropy-5.5mm,0) arc (-180:0:\radiustropy+5.5mm);             

    %%%%%%%%%%%%%%%%%%%%%
    % third calendar year
    \draw [->,draw=red!60!black!20!white,-{Stealth[red!60!black!40!white,open,scale=1.0]}] 
       (0,0) -- (340:\radiustropy+11.0mm);

    % third year
    \pic at (340:\radiustropy+11.0mm) {atip={yshift=-0.5}{rotate=-20.0}{scale=1.00}{black!75}{line width=0.4}{fill=white!100!black!75}};
 
    % border of circled info text 3i
    \draw[line width=0.4,] (340:\radiustropy+10mm) arc (-20:334.5:\radiustropy+10mm);      
    % border of circled info text 3a
    \draw[line width=0.4,] (340:\radiustropy+12.25mm) arc (-20:335:\radiustropy+12.25mm);
    \path%
    [%
     postaction={decorate,%
          decoration={raise=-1.50pt,%
          text along path, %
          text format delimiters={[}{]},
          text={[\tiny]KJ3 beguuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuinnen synchron [] },
          %reverse path,
          text align={align=center}
                     }%
         }%
    ]
    (-\radiustropy-11mm,0) arc (180:0:\radiustropy+11mm);    

    \path [,postaction={decorate,decoration={raise=-2.0pt,text along path,%
          text format delimiters={[}{]},
          text={[\tiny]KJ3 ca. 18 std diff to year 1 [] },
     text align={align=}
    }}](-\radiustropy-11mm,0) arc (-180:0:\radiustropy+11mm);             
    %start third year
    \draw [] (340:\radiustropy+10mm) -- (340:\radiustropy+12.25mm);

    % a grid
    %\draw[step=.05cm,blue!50!white,very thin] (3,-1.5) grid (5,1.5);
    \draw[step=.1cm,gray!50!white,very thin] (0,-1) grid (5,5);
    \draw[step=1cm,black!40!red, very thin,opacity=0.4] (0,-1) grid (5,5);
    \foreach \x/\xtext in {0,4,5}
       \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {\tiny$\xtext$};
    \foreach \y/\ytext in {1,5}
       \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {\tiny$\ytext$};
    % end grid
    \end{tikzpicture}

    \end{document}

在此处输入图片描述

相关内容