Tikz 中不需要的双重箭头

Tikz 中不需要的双重箭头

我正在尝试制作一个带有圆形尖端的箭头。箭头完全符合我的要求,只是它有一个双尖端,而我只想要一个。我多次检查代码但没有成功,也许这是默认选项?

这是该部分的图片(忽略风格,由于它是最小代码,因此非常简洁):

双箭头尖

代码如下:

\documentclass[10pt]{article}
\usepackage[a4paper, margin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{rotating}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,snakes}

\pgfplotsset{compat=1.7}
\pagestyle{empty}
\begin{document}

    \tikzset{
proar/.style={
    draw=black,
    -*,
    fill=green,
    }}

     \begin{tikzpicture}[y=-6.6mm]
                \centering

        \filldraw[fill=white, midway, draw, inner sep=1pt] (8.2,-1) rectangle (8.8,5.5);

        \foreach \y [evaluate=\y as \year using int(1700+\y*10)] in {0,1,...,5}{ 

                \draw[] (8.5,\y) -- (8.5,\y) node[font=\scriptsize] {$\year$}; 
                \draw[] (8,\y) -- (8.2,\y);
                \draw[] (8.1,\y+.5) -- (8.2,\y+.5);
                \draw[] (8.8,\y) -- (9,\y);
                \draw[] (8.8,\y+.5) -- (8.9,\y+.5);
                }

        \draw[proar] (8.8,3) edge[out=0,in=180] (10,5) node[right] at (10,5) {random text};

        \end{tikzpicture}

\end{document}

答案1

如果将选项添加-*到边缘而不是绘制,那么您只能在一侧获得它:

\draw[draw=black,fill=green] (8.8,3) edge[out=0,in=180,-*] (10,5) node[right] at (10,5) {random text};

在此处输入图片描述

代码:

\documentclass[10pt]{article}
\usepackage[a4paper, margin=1cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{rotating}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds,snakes}

\pgfplotsset{compat=1.7}
\pagestyle{empty}
\begin{document}

    \tikzset{
proar/.style={
    draw=black,
    -*,
    fill=green,
    }}
     \begin{tikzpicture}[y=-6.6mm]
                \centering

        \filldraw[fill=white, midway, draw, inner sep=1pt] (8.2,-1) rectangle (8.8,5.5);

        \foreach \y [evaluate=\y as \year using int(1700+\y*10)] in {0,1,...,5}{ 

                \draw[] (8.5,\y) -- (8.5,\y) node[font=\scriptsize] {$\year$}; 
                \draw[] (8,\y) -- (8.2,\y);
                \draw[] (8.1,\y+.5) -- (8.2,\y+.5);
                \draw[] (8.8,\y) -- (9,\y);
                \draw[] (8.8,\y+.5) -- (8.9,\y+.5);
                }

        \draw[draw=black,fill=green] (8.8,3) edge[out=0,in=180,-*] (10,5) node[right] at (10,5) {random text};

        \end{tikzpicture}
     \begin{tikzpicture}[y=-6.6mm]
                \centering

        \filldraw[fill=white, midway, draw, inner sep=1pt] (8.2,-1) rectangle (8.8,5.5);

        \foreach \y [evaluate=\y as \year using int(1700+\y*10)] in {0,1,...,5}{ 

                \draw[] (8.5,\y) -- (8.5,\y) node[font=\scriptsize] {$\year$}; 
                \draw[] (8,\y) -- (8.2,\y);
                \draw[] (8.1,\y+.5) -- (8.2,\y+.5);
                \draw[] (8.8,\y) -- (9,\y);
                \draw[] (8.8,\y+.5) -- (8.9,\y+.5);
                }

        \draw[draw=black,fill=green] (8.8,3) edge[out=0,in=180,*-] (10,5) node[right] at (10,5) {random text};

        \end{tikzpicture}

\end{document}

相关内容