View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ton Hospel > Graph-Layout-Aesthetic-0.12 > Graph::Layout::Aesthetic::Monitor::GnuPlot



Annotate this POD


New  1
Open  1
View/Report Bugs
Module Version: 0.02   Source  


Graph::Layout::Aesthetic::Monitor::GnuPlot - Display progress of a graph layout using gnuplot


    use Graph::Layout::Aesthetic::Monitor::GnuPlot;
    $monitor = Graph::Layout::Aesthetic::Monitor::GnuPlot->new(%parameters);

    # Now use it with Graph::Layout::Aesthetic object $aglo:
    $aglo->gloss(monitor => $monitor);

    # That's the basics. You likely won't need the stuff after this point
    $monitor->commandf($format, @arguments);
    $time = $monitor->last_plot_time;


Graph::Layout::Aesthetic::Monitor::GnuPlot is a simple class based on gnuplot that is meant to help you to monitor the progress of a graph layout. It has the right interface so it can be directly used as the value of the monitor parameter to Graph::Layout::Aesthetic method gloss.


$monitor = Graph::Layout::Aesthetic::Monitor::GnuPlot->new(%parameters)

Creates a new Graph::Layout::Aesthetic::Monitor::GnuPlot object. The parameters are name/value pairs which currently can be:

after_plot => $callback

Whenever the plot method is called, this callback is also executed after flushing the actual plot commands to gnuplot like this:

    $callback->($aglo, $monitor);

Unless $callback is false (the default) in which case nothing gets done.


Takes the current Graph::Layout::Aesthetic $aglo state and plots it. At the end of this call the after_plot callback is done if any was given.

This method usually gets called implicitly by the Graph::Layout::Aesthetic method gloss.


Sends $command directly to gnuplot. Since no flush on the controlling pipe is done the command may (or may not) get buffered and therefore not executed until something flushes it. See command_flush.

A newline gets appended to the $command internally.


The same as command, but also flushes the controlling pipe to gnuplot. So all already buffered commands and this command will get executed.

$monitor->commandf($format, @arguments)

The same as command, but with a printf style interface.

$time = $monitor->last_plot_time

Return the epoch time of the last time a plot method call returned. Returns undef if a plot has never been done yet.




Graph::Layout::Aesthetic, gnuplot(1)


Ton Hospel, <>


Copyright (C) 2004 by Ton Hospel

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.1 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: