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.
using the following code...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.
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?#!/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);
In reply to Graph::Layout::Aesthetic::Topology question by thekestrel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |