The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  <title>Arrow Shapes | Graphviz - Graph Visualization Software</title>
  <link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/ckeditor/ckeditor.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/mollom/mollom.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/forum/forum.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/sites/all/modules/views/css/views.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/themes/bluemarine/gv.css?W" />
<link type="text/css" rel="stylesheet" media="all" href="/themes/bluemarine/style.css?W" />
  <script type="text/javascript" src="/misc/jquery.js?W"></script>
<script type="text/javascript" src="/misc/drupal.js?W"></script>
<script type="text/javascript" src="/sites/all/modules/mollom/mollom.js?W"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/" });
//--><!]]>
</script>
  <script type="text/javascript"> </script>
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" id="header">
  <tr>
    <td id="logo">
      <a href="/" title="Home"><img src="/app.png" alt="Home" /></a>      <h1 class='site-name'><a href="/" title="Home">Graphviz - Graph Visualization Software</a></h1>      <div class='site-slogan'>Drawing graphs since 1988</div>    </td>
    <td id="menu">
            <ul class="links" id="navlist"><li class="menu-237 first"><a href="/Forum" title="">Forums</a></li>
<li class="menu-238"><a href="/wiki/" title="Graphviz Wiki">Wiki</a></li>
<li class="menu-210 last"><a href="/contact" title="Get in touch with us.">Contact Us</a></li>
</ul>      <form action="/content/arrow-shapes"  accept-charset="UTF-8" method="post" id="search-theme-form">
<div><div id="search" class="container-inline">
  <div class="form-item" id="edit-search-theme-form-1-wrapper">
 <label for="edit-search-theme-form-1">Search this site: </label>
 <input type="text" maxlength="128" name="search_theme_form" id="edit-search-theme-form-1" size="15" value="" title="Enter the terms you wish to search for." class="form-text" />
</div>
<input type="submit" name="op" id="edit-submit-1" value="Search"  class="form-submit" />
<input type="hidden" name="form_build_id" id="form-f9362d81f31a58b2bded2d51770bc10d" value="form-f9362d81f31a58b2bded2d51770bc10d"  />
<input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form"  />
</div>

</div></form>
    </td>
  </tr>
  <tr>
    <td colspan="2"><div></div></td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" id="content">
  <tr>
    <td id="sidebar-left">
        <div class="block block-menu" id="block-menu-menu-menu-user-navigation">
    <h2 class="title"></h2>
    <div class="content"><ul class="menu"><li class="leaf first"><a href="/Home.php" title="Home Page">Home</a></li>
<li class="leaf"><a href="/About.php" title="About">About</a></li>
<li class="leaf"><a href="/Download.php" title="Download">Download</a></li>
<li class="leaf"><a href="/News.php" title="News">News</a></li>
<li class="leaf"><a href="/Gallery.php" title="Gallery">Gallery</a></li>
<li class="leaf"><a href="/Documentation.php" title="Documentation">Documentation</a></li>
<li class="leaf"><a href="/Theory.php" title="Theory">Theory</a></li>
<li class="leaf"><a href="/content/graphviz-issue-tracker" title="Issue and Bug Tracking">Bug and Issue Tracking</a></li>
<li class="leaf"><a href="/MailingList.php" title="Mailing List">Mailing List</a></li>
<li class="leaf"><a href="/License.php" title="License">License</a></li>
<li class="leaf"><a href="/Resources.php" title="Resources">Resources</a></li>
<li class="leaf"><a href="/Credits.php" title="Credits">Credits</a></li>
<li class="collapsed"><a href="/Forum" title="Forum Link">Forums</a></li>
<li class="leaf"><a href="/content/faq" title="Frequently Asked Questions">FAQ</a></li>
<li class="leaf last"><a href="http://www.graphviz.org/wiki/wiki-main-page" title="Wiki home page">Wiki</a></li>
</ul></div>
 </div>
  <div class="block block-user" id="block-user-0">
    <h2 class="title">User login</h2>
    <div class="content"><form action="/content/arrow-shapes?destination=node%2F115"  accept-charset="UTF-8" method="post" id="user-login-form">
<div><div class="form-item" id="edit-name-wrapper">
 <label for="edit-name">Username: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="60" name="name" id="edit-name" size="15" value="" class="form-text required" />
</div>
<div class="form-item" id="edit-pass-wrapper">
 <label for="edit-pass">Password: <span class="form-required" title="This field is required.">*</span></label>
 <input type="password" name="pass" id="edit-pass"  maxlength="60"  size="15"  class="form-text required" />
</div>
<input type="submit" name="op" id="edit-submit" value="Log in"  class="form-submit" />
<div class="item-list"><ul><li class="first"><a href="/user/register" title="Create a new user account.">Create new account</a></li>
<li class="last"><a href="/user/password" title="Request new password via e-mail.">Request new password</a></li>
</ul></div><input type="hidden" name="form_build_id" id="form-1c8b3030eb5727a5b069a54810f1f3cf" value="form-1c8b3030eb5727a5b069a54810f1f3cf"  />
<input type="hidden" name="form_id" id="edit-user-login-block" value="user_login_block"  />

</div></form>
</div>
 </div>
    </td>    <td valign="top">
            <div id="main">
        <div class="breadcrumb"><a href="/">Home</a></div>        <h1 class="title">Arrow Shapes</h1>
        <div class="tabs"></div>
                          <div class="node">
            <span class="submitted"></span>
    <div class="taxonomy"></div>
    <div class="content"><A NAME="top"></a>
<HR />
Arrow shapes can be specified and named using the following simple
grammar. 
Terminals are shown in bold font and nonterminals in italics.
Literal characters are given in single quotes.
Square brackets [ and ] enclose optional items.
Vertical bars | separate alternatives.
<TABLE>
<TR>
  <TD ALIGN=RIGHT><I>arrowname</i></td>
  <TD ALIGN=LEFT>:</td>
  <TD ALIGN=LEFT><I>aname</i> [ <I>aname</i> [ <I>aname</i> [ <I>aname</i> ] ] ]</td>
</tr>
<TR>
  <TD ALIGN=RIGHT><I>aname</i></td>
  <TD ALIGN=LEFT>:</td>
  <TD ALIGN=LEFT>[ <I>modifiers</i> ] <I>shape</i></td>
</tr>
<TR>
  <TD ALIGN=RIGHT><I>modifiers</i></td>
  <TD ALIGN=LEFT>:</td>
  <TD ALIGN=LEFT>[ <B>'o'</b> ] [ <I>side</i> ]</td>
</tr>
<TR>
  <TD ALIGN=RIGHT><I>side</i></td>
  <TD ALIGN=LEFT>:</td>
  <TD ALIGN=LEFT><B>'l'</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>'r'</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT><I>shape</i></td>
  <TD ALIGN=LEFT>:</td>
  <TD ALIGN=LEFT><B>box</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>crow</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>curve</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>diamond</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>dot</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>inv</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>none</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>normal</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>tee</b></td>
</tr>
<TR>
  <TD ALIGN=RIGHT></td>
  <TD ALIGN=LEFT>|</td>
  <TD ALIGN=LEFT><B>vee</b></td>
</tr>
</table>
<P>
The primitive shapes are:
<CENTER>
<TABLE>
  <TR>
    <TD>"box"<TD><IMG SRC="/doc/info/a_box.gif" />
    <TD>"crow"<TD><IMG SRC="/doc/info/a_crow.gif" />
    <TD>"curve"<TD><IMG SRC="/doc/info/a_curve.gif" />
    <TD>"diamond"<TD><IMG SRC="/doc/info/a_diamond.gif" />
    <TD>"dot"<TD><IMG SRC="/doc/info/a_dot.gif" />
  </td></td></td></td></td></td></td></td></td></td></tr>
  <TR>
  </tr>
  <TR>
    <TD>"inv"<TD><IMG SRC="/doc/info/a_inv.gif" />
    <TD>"none"<TD><IMG SRC="/doc/info/a_none.gif" />
    <TD>"normal"<TD><IMG SRC="/doc/info/a_normal.gif" />
    <TD>"tee"<TD><IMG SRC="/doc/info/a_tee.gif" />
    <TD>"vee"<TD><IMG SRC="/doc/info/a_open.gif" />
  </td></td></td></td></td></td></td></td></td></td></tr>
</table>
</center>
</p><P>
As for the modifiers:
<DL>
<DT>'l'
  <DD> Clip the shape, leaving only the part to the left of the edge.
<DT>'r'
  <DD> Clip the shape, leaving only the part to the right of the edge.
<DT>'o'
  <DD> Use an open (non-filled) version of the shape.
</dd></dt></dd></dt></dd></dt></dl>
Left and right are defined as those directions determined by looking
from the edge towards the point where the arrow "touches" the node.
</p><P>
As an example, the arrow shape <TT>lteeoldiamond</tt> is parsed as
<TT>'l' 'tee' 'o' 'l' 'diamond'</tt> and corresponds to the shape
<CENTER>
<IMG SRC="/doc/info/a_lteeoldiamond.gif" />
</center>
Note that the first arrow shape specified occurs closest to the node.
Subsequent arrow shapes, if specified, occur further from the node.
Also, a shape of <tt>none</tt> uses space, so, for example, the arrowhead <tt>nonenormal</tt>
is not the same as <tt>normal</tt>.
</p><P>
Not all syntactically legal combinations of modifiers are meaningful
or semantically valid.
For example, none of the modifiers make any sense with <TT>none</tt>.
The following table indicates which modifiers are allowed with which shapes.
</p><P>
<CENTER>
<TABLE BORDER=2>
<TR ALIGN=CENTER>
 <TH>Modifier</th>
 <TH>box
 <TH>crow
 <TH>curve
 <TH>diamond
 <TH>dot
 <TH>inv
 <TH>none
 <TH>normal
 <TH>tee
 <TH>vee
</th></th></th></th></th></th></th></th></th></th></tr>
<TR ALIGN=CENTER><TD>'l'/'r'<TD>X<TD>X<TD>X<TD>X<TD>&nbsp;<TD>X<TD>&nbsp;<TD>X<TD>X<TD>X</td></td></td></td></td></td></td></td></td></td></td></tr>
<TR ALIGN=CENTER><TD>'o'    <TD>X<TD>&nbsp;<TD>&nbsp;<TD>X<TD>X<TD>X<TD>&nbsp;<TD>X<TD>&nbsp;<TD>&nbsp;</td></td></td></td></td></td></td></td></td></td></td></tr>
</table>
</center>
</p><P>
This yields 39 different arrow shapes. The optional second, third, fourth shapes
can independently be any of the 39, except the last cannot be <TT>none</tt> as
this would create a redundant shape.
Thus, there are 38 &middot; 39<sup>3</sup> + 38 &middot; 39<sup>2</sup> + 38 &middot; 39 + 39 = 2,313,441 different combinations.

</p><P>
The following display contains the 39 combinations possible with a single
arrow shape. The node attached to the arrow is not drawn but would appear
on the right side of the edge.
</p><P>
<CENTER>
<TABLE>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_box.gif" />
    <TD><IMG SRC="/doc/info/aa_lbox.gif" />
    <TD><IMG SRC="/doc/info/aa_rbox.gif" />
    <TD><IMG SRC="/doc/info/aa_obox.gif" />
    <TD><IMG SRC="/doc/info/aa_olbox.gif" />
    <TD><IMG SRC="/doc/info/aa_orbox.gif" />
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>box
    <TD>lbox
    <TD>rbox
    <TD>obox
    <TD>olbox
    <TD>orbox
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_crow.gif" />
    <TD><IMG SRC="/doc/info/aa_lcrow.gif" />
    <TD><IMG SRC="/doc/info/aa_rcrow.gif" />
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>crow
    <TD>lcrow
    <TD>rcrow
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_diamond.gif" />
    <TD><IMG SRC="/doc/info/aa_ldiamond.gif" />
    <TD><IMG SRC="/doc/info/aa_rdiamond.gif" />
    <TD><IMG SRC="/doc/info/aa_odiamond.gif" />
    <TD><IMG SRC="/doc/info/aa_oldiamond.gif" />
    <TD><IMG SRC="/doc/info/aa_ordiamond.gif" />
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>diamond
    <TD>ldiamond
    <TD>rdiamond
    <TD>odiamond
    <TD>oldiamond
    <TD>ordiamond
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_dot.gif" />
    <TD><IMG SRC="/doc/info/aa_odot.gif" />
  </td></td></tr>
  <TR ALIGN=CENTER>
    <TD>dot
    <TD>odot
  </td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_inv.gif" />
    <TD><IMG SRC="/doc/info/aa_linv.gif" />
    <TD><IMG SRC="/doc/info/aa_rinv.gif" />
    <TD><IMG SRC="/doc/info/aa_oinv.gif" />
    <TD><IMG SRC="/doc/info/aa_olinv.gif" />
    <TD><IMG SRC="/doc/info/aa_orinv.gif" />
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>inv
    <TD>linv
    <TD>rinv
    <TD>oinv
    <TD>olinv
    <TD>orinv
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_none.gif" />
  </td></tr>
  <TR ALIGN=CENTER>
    <TD>none
  </td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_normal.gif" />
    <TD><IMG SRC="/doc/info/aa_lnormal.gif" />
    <TD><IMG SRC="/doc/info/aa_rnormal.gif" />
    <TD><IMG SRC="/doc/info/aa_onormal.gif" />
    <TD><IMG SRC="/doc/info/aa_olnormal.gif" />
    <TD><IMG SRC="/doc/info/aa_ornormal.gif" />
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>normal
    <TD>lnormal
    <TD>rnormal
    <TD>onormal
    <TD>olnormal
    <TD>ornormal
  </td></td></td></td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_tee.gif" />
    <TD><IMG SRC="/doc/info/aa_ltee.gif" />
    <TD><IMG SRC="/doc/info/aa_rtee.gif" />
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>tee
    <TD>ltee
    <TD>rtee
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_vee.gif" />
    <TD><IMG SRC="/doc/info/aa_lvee.gif" />
    <TD><IMG SRC="/doc/info/aa_rvee.gif" />
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>vee
    <TD>lvee
    <TD>rvee
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD><IMG SRC="/doc/info/aa_curve.gif" />
    <TD><IMG SRC="/doc/info/aa_lcurve.gif" />
    <TD><IMG SRC="/doc/info/aa_rcurve.gif" />
  </td></td></td></tr>
  <TR ALIGN=CENTER>
    <TD>curve
    <TD>lcurve
    <TD>rcurve
  </td></td></td></tr>
</table>
</center>
</p></div>
      </div>
  <div class="block block-comment" id="block-comment-0">
    <h2 class="title">Recent comments</h2>
    <div class="content"><div class="item-list"><ul><li class="first"><a href="/content/gvfreelayout-and-bb-attribute#comment-1552">gvFreeLayout</a><br />5 hours 16 min ago</li>
<li><a href="/content/gvfreelayout-and-bb-attribute#comment-1551">Can you be more specific as</a><br />6 hours 19 min ago</li>
<li><a href="/content/xdot-versions-etc#comment-1550">I don&#039;t understand. Anyone</a><br />7 hours 52 min ago</li>
<li><a href="/content/xdot-versions-etc#comment-1549">It looks somehow complicated</a><br />16 hours 4 min ago</li>
<li><a href="/content/mindist-circo-not-working-library#comment-1548">Your patch has been applied.</a><br />2 days 3 hours ago</li>
<li><a href="/content/img-tag-padding#comment-1547">workaround: downgrade to 2.20.2, bug #2397 opened</a><br />2 days 7 hours ago</li>
<li><a href="/content/img-tag-padding#comment-1546">this is regression since graphviz 2.20.2</a><br />2 days 10 hours ago</li>
<li><a href="/content/graphviz-iphone#comment-1543">Graphviz on iPhone</a><br />4 days 12 hours ago</li>
<li><a href="/content/using-gvmap-library#comment-1542">You can certainly modify and</a><br />1 week 1 day ago</li>
<li class="last"><a href="/content/xdot-versions-etc#comment-1541">Future features should be</a><br />1 week 1 day ago</li>
</ul></div></div>
 </div>
              </div>
    </td>
    <td id="sidebar-right">
        <div class="block block-forum" id="block-forum-1">
    <h2 class="title">New forum topics</h2>
    <div class="content"><div class="item-list"><ul><li class="first"><a href="/content/gvfreelayout-and-bb-attribute" title="2 comments">gvFreeLayout and bb attribute</a></li>
<li><a href="/content/gvfreelayout-leakage">gvFreeLayout leakage</a></li>
<li><a href="/content/mindist-circo-not-working-library" title="1 comment">Mindist in Circo not working (library)</a></li>
<li><a href="/content/using-gvmap-library" title="1 comment">using gvmap as a library</a></li>
<li class="last"><a href="/content/xdot-versions-etc" title="7 comments">xdot versions etc</a></li>
</ul></div><div class="more-link"><a href="/forum" title="Read the latest forum topics.">more</a></div></div>
 </div>
    </td>  </tr>
</table>

<div id="footer">
    </div>
</body>
</html>