画一个长箭头

画一个长箭头

如何在这个箭头上添加“时间”这个词?这是我的代码。非常感谢。

\begin{tikzpicture}[
            > = Straight Barb,
node distance = 28mm and 44mm,
    BC/.style = {
        decorate,
        decoration={calligraphic brace, 
                    raise=3pt, amplitude=6pt},
                    very thick, pen colour={black}
                },
   dot/.style = {circle, fill, inner sep=2pt, outer sep=0pt},
every label/.append style = {align=left},
font= \linespread{1}\selectfont
                    ]
\draw[thick,->] (0,0) -- (13,0);
\node (a) [dot,label=below:some\\text here.] at (2.2,0) {};
\node (b) [dot,label=below:some\\text here.,
           right=of a] {};
\node (c) [dot,label=below:some\\text here.,
           right=of b] {};
\draw[->]  (a) -- ++ (0,0.5) node [above] {\emph{t} = 0};           
\draw[->]  (b) -- ++ (0,0.5) node[above] {\emph{t} = 1};
\draw[->]  (c) -- ++ (0,0.5) node[above] {\emph{t} = 2};           
    \end{tikzpicture}

\end{figure}

我要这个: 在此处输入图片描述

答案1

只需将其添加到长箭头的路径node[right] {Time}末尾即可。\draw

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, positioning}

\begin{document}

\begin{tikzpicture}[
            > = Straight Barb,
node distance = 28mm and 44mm,
   dot/.style = {circle, fill, inner sep=2pt, outer sep=0pt},
every label/.append style = {align=left},
font= \linespread{1}\selectfont
                    ]
\draw[thick,->] (0,0) -- (13,0) node[right] {Time};
\node (a) [dot,label=below:some\\text here.] at (2.2,0) {};
\node (b) [dot,label=below:some\\text here.,
           right=of a] {};
\node (c) [dot,label=below:some\\text here.,
           right=of b] {};
\draw[->]  (a) -- ++ (0,0.5) node[above] {\emph{t} = 0};           
\draw[->]  (b) -- ++ (0,0.5) node[above] {\emph{t} = 1};
\draw[->]  (c) -- ++ (0,0.5) node[above] {\emph{t} = 2};           
\end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

\draw[thick,->] (0,0) -- (13,0) node [right] {$t$};只需在箭头末端添加一个节点。

\documentclass{article}
\usepackage{tikz} 
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[
%            > = Straight Barb,
node distance = 28mm and 44mm,
    BC/.style = {
        decorate,
        decoration={calligraphic brace, 
                    raise=3pt, amplitude=6pt},
                    very thick, pen colour={black}
                },
   dot/.style = {circle, fill, inner sep=2pt, outer sep=0pt},
every label/.append style = {align=left},
font= \linespread{1}\selectfont
                    ]
\draw[thick,->] (0,0) -- (13,0) node [right] {$t$};
\node (a) [dot,label=below:some\\text here.] at (2.2,0) {};
\node (b) [dot,label=below:some\\text here.,
           right=of a] {};
\node (c) [dot,label=below:some\\text here.,
           right=of b] {};
\draw[->]  (a) -- ++ (0,0.5) node [above] {\emph{t} = 0};           
\draw[->]  (b) -- ++ (0,0.5) node[above] {\emph{t} = 1};
\draw[->]  (c) -- ++ (0,0.5) node[above] {\emph{t} = 2};           
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容