Graphics, Figures & TablesArrow Heads

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
S_David
Posts: 45
Joined: Tue Jul 07, 2009 4:16 am

Arrow Heads

Post by S_David »

Hello,

I am using PGF/Tikz package in latex to draw figures. In the following segment of code, the arrow heads do not suite the figure. How can I change them to a more appropriate one?

Code: Select all

\documentclass[a4paper,12pt,openany,oneside]{memoir}
\listfiles
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{center}
\begin{tikzpicture}

    \node (source) at (0,0) [circle,double,draw,label=below:Source] {$S$};
    \node (relay) at (3,2) [circle,double,draw,label=above:Relay] {$R$};
    \node (destination) at (6,0) [circle,double,draw,label=below:Destination] {$D$};

    \draw [double distance=2pt,->] (source.60) to node [auto] {$\mathbf{H}_A$} (relay.west);
    \draw [double distance=2pt,->] (relay.east) to node [auto] {$\mathbf{H}_B$} (destination.120);
    \draw [double distance=2pt,->] (source.east) to node [auto,swap] {$\mathbf{H}_C$} (destination.west);
\end{tikzpicture}

\end{center}
\end{figure}
\end{document}
Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Arrow Heads

Post by gmedina »

Hi,

load the arrows library and select the desired style. Refer to the PGF manual (22 "Arrow Tip Library", pages 224-225).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Arrow Heads

Post by localghost »

Beside the library suggested by gmedina the pgf/tikZ manual also describes the built-in arrow features (Section 14.3.4 - Graphic Parameters: Arrow Tips, p.134f).


Best regards
Thorsten
S_David
Posts: 45
Joined: Tue Jul 07, 2009 4:16 am

Arrow Heads

Post by S_David »

gmedina wrote:Hi,

load the arrows library and select the desired style. Refer to the PGF manual (22 "Arrow Tip Library", pages 224-225).
Thank you. I found the solution. But I have another question: how can I fill the distance between the double lines in the circles and the paths by say the black color?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Arrow Heads

Post by gmedina »

Sorry for the late reply. You could use the double=<color> option; i.e., you could use something like the following:

Code: Select all

\draw [double=black,double distance=2pt,->] (relay.east) to node [auto]
  {$\mathbf{H}_B$} (destination.120);
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply