In the GraphViz docs, there's the following item under the add_edge section:

decorateP

    if set, draws a line from the edge to the label

I can't find any tests which exercise this attribute, nor do any of the examples use it. In trying it,m it appears to be a no-op, but I could be using it incorrectly:

#!/usr/bin/perl -w use strict; use GraphViz; my $g = GraphViz->new(); #my @decorate; # move the comment to the next line to try it without my @decorate = (decorateP => 1); $g->add_node('London'); $g->add_node('Paris', label => 'City of\nlurve'); $g->add_node('New York'); $g->add_edge('London' => 'Paris', @decorate); $g->add_edge('London' => 'New York', label => 'Far', @decorate); $g->add_edge('Paris' => 'London', @decorate); $g->as_png('simple.png');

Regardless of whether or not I use the decorateP attribute, the pngs appear the same.

The binary is 1.13 (v16) on OS X. Googling has proven fruitless. Am I simply using Graphviz wrong? When building complex graphs, lacking that line from the label to the edge can get confusing (and the graph I linked to is a rather simple one.)

Cheers,
Ovid

New address of my CGI Course.


In reply to GraphViz decorateP attribute not working? by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.