Monks,

I've recently started playing with the Graph::Layout::Aesthetic (0.08) module and have come across a few problems that I was hoping someone might have encountered before.

My first one was the Graph::Layout::Aesthetic::Topology->from_graph subroutine was failing because the Graph I was sending it contained newer vertices (05) and I was getting and error that my graph was not o2 compatible. I set a flag to downconvert my graph to use vertices02 and that got past that then added a check in the Topology.pm instead to forward to the right command depending on the version of the vertices.

Now I'm having another problem with the from_graph functionality as I'm getting an error whilst trying to feed my topology to the Graph::Layout::Aesthetic::Monitor::GnuPlot->plot.

gnuplot> plot "-" ^ line 1: no data point found in specified file Unexpected returncode from gnuplot: 256 at /usr/lib/perl5/site_perl/5. +8/cygwin/Graph/Layout/Aesthetic/Monitor/GnuPlot.pm line 117.
using the following code...
#!/usr/bin/perl use strict; use Graph; use Graph::Layout::Aesthetic::Topology; use Graph::Layout::Aesthetic::Monitor::GnuPlot; my $g = Graph->new(); $g->add_vertex("V1"); $g->add_vertex("V2"); my $topology = Graph::Layout::Aesthetic::Topology->from_graph($g); my $monitor = Graph::Layout::Aesthetic::Monitor::GnuPlot->new(); my $aglo = Graph::Layout::Aesthetic->new($topology); $monitor->plot($aglo);
Here is the bit I don't understand, there is another method of Topology called new_vertices where I can send it data directly and this works fine. The only thing is I can't find the new_vertices subroutine, it not in Topology.pm at all? I thought it might get inherited from another of the parent modules, but can't find it in there also. The man of Topology says $graph = Graph::Layout::Aesthetic::Topology->new_vertices($nr_vertices); but I can't find the code? Once I have the code I'll be able to compare the implementations so that I can get from_graph working. It takes and argument $class which is how it calls new_vertices and I'm guessing is why my from_graph call is falling, but where is the code for new_vertices?
Thanks in advance for help.

Regards Paul.

In reply to Graph::Layout::Aesthetic::Topology question by thekestrel

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.