Sponsored Content
Top Forums Programming Perl GD::Graph and outputting to a graphics file Post 302268521 by JamesGoh on Monday 15th of December 2008 07:39:31 PM
Old 12-15-2008
I managed to solve the problem.

It was a case of using the 'require' keyword to include an external perl script and invoking the method contained within it in order to properly create a graphics file.

In my case Im using GDGraph-1.44_01 package, so you MUST include the following in your perl script at all times

Code:
# At the start

require '/complete path name of save.pl/save.pl


# When you want to export to a graphics file

save_chart($graph,$graph_title);

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Installing GD Perl graphics modules

I'm on Mac OSX, I *think* I succeeded in installing libpng. I can see usr/local/lib/libpng.dylib and its brethren are in place after executing ./configure nd and the holy make install. (2 Replies)
Discussion started by: andrewduncan
2 Replies

2. Shell Programming and Scripting

Perl with Excel Graph

Hi Everyone, Would like to know some hints where should I look for, if I want to do the perl with excel graph staff, i read some people say can use GD:Graph, would please give me some guide on where should I search for, which keyword should I put into google to search. Thanks (1 Reply)
Discussion started by: jimmy_y
1 Replies

3. Shell Programming and Scripting

outputting a text file in html

is there anyway i can paste/cat a text file into a html paragraph <p> function html_header { cat <<END <html> <head><title>${1}</title></head> <body> <p> ${2} </p> END } function html_footer { cat <<END </body> </html> END (2 Replies)
Discussion started by: magnia
2 Replies

4. Shell Programming and Scripting

write a perl script or kornshell reading a two files and outputting to comma format

Hello Can someone help me to write a perl script or kornshell reading a two files and outputting to comma format. Here is the two files listofdisks.txt id, diskname, diskgroup, diskisze(GB), FC 1, CN34, GRP1, 30, FC_CN34 2, CN67, GRP5, 19, 4, VD1, GRP4, 23, FC_VD1 6, CF_D1, ... (0 Replies)
Discussion started by: deiow
0 Replies

5. Shell Programming and Scripting

awk, sed, perl assistance in outputting formatted file

Hello, Please advise. Scoured this site, as well as google for answers. However if you do not know what to search for, it's a bit hard to find answers. INPUT: ACTASS= 802 BASECOS= 279 COSNCHG= 3 CUSCOS= 52 UPLDCOS= 2 DESIRED OUTPUT: ACTASS=802 BASECOS=279 (13 Replies)
Discussion started by: abacus
13 Replies

6. Red Hat

Outputting clive --debug to file?

I am running clive on Linux version 2.6.24.5-85.fc8 (Red Hat 4.1.2-33) with the debug command as follows clive --debug -O <logfile> http://www.youtube.com/watch?v.... I need to get the contents of the debug written to file to extract data later. Using the -O option actually writes the... (0 Replies)
Discussion started by: rob171171
0 Replies

7. UNIX for Dummies Questions & Answers

outputting set -x to file

I need to enable set -x in my croned script as at times the script is not returning all data that it should be. This only happens intermittently and as such I would like a means of being able to check what goes wrong. My question is how to output the debug of set -x to file? (1 Reply)
Discussion started by: rob171171
1 Replies

8. UNIX for Dummies Questions & Answers

Help with Plotting a graph using Perl

Dear all, I have a hash in my data file and I'd like to output the data contained within as a graph (can be lines or histogram form) but I dont know how to do this with Perl. Can somone suggest how I can have a graph with Keys of the hash being on the X-axis and the Values for the keys plotted on... (1 Reply)
Discussion started by: pawannoel
1 Replies

9. OS X (Apple)

[Solved] links2 --enable-graphics from source, configure error: no graphics driver found.

Howdy I am trying to install links2 with graphics support on snow leopard 10.6.8 (xcode installed). I have had the program running last year, also installed from source - but then I had installed some image libraries with mac ports and fink - cannot reproduce that setup. Plus I would like to not... (6 Replies)
Discussion started by: butterbaerchen
6 Replies
Graph::TransitiveClosure(3pm)				User Contributed Perl Documentation			     Graph::TransitiveClosure(3pm)

Graph::TransitiveClosure - create and query transitive closure of graph

SYNOPSIS
use Graph::TransitiveClosure; use Graph::Directed; # or Undirected my $g = Graph::Directed->new; $g->add_...(); # build $g # Compute the transitive closure graph. my $tcg = Graph::TransitiveClosure->new($g); $tcg->is_reachable($u, $v) # Identical to $tcg->has_edge($u, $v) # Being reflexive is the default, meaning that null transitions # (transitions from a vertex to the same vertex) are included. my $tcg = Graph::TransitiveClosure->new($g, reflexive => 1); my $tcg = Graph::TransitiveClosure->new($g, reflexive => 0); # is_reachable(u, v) is always reflexive. $tcg->is_reachable($u, $v) # The reflexivity of is_transitive(u, v) depends of the reflexivity # of the transitive closure. $tcg->is_transitive($u, $v) # You can check any graph for transitivity. $g->is_transitive() my $tcg = Graph::TransitiveClosure->new($g, path_length => 1); $tcg->path_length($u, $v) # path_vertices is automatically always on so this is a no-op. my $tcg = Graph::TransitiveClosure->new($g, path_vertices => 1); $tcg->path_vertices($u, $v) # Both path_length and path_vertices. my $tcg = Graph::TransitiveClosure->new($g, path => 1); $tcg->path_vertices($u, $v) $tcg->length($u, $v) my $tcg = Graph::TransitiveClosure->new($g, attribute_name => 'length'); $tcg->path_length($u, $v) DESCRIPTION
You can use "Graph::TransitiveClosure" to compute the transitive closure graph of a graph and optionally also the minimum paths (lengths and vertices) between vertices, and after that query the transitiveness between vertices by using the "is_reachable()" and "is_transitive()" methods, and the paths by using the "path_length()" and "path_vertices()" methods. For further documentation, see the Graph::TransitiveClosure::Matrix. Class Methods new($g, %opt) Construct a new transitive closure object. Note that strictly speaking the returned object is not a graph; it is a graph plus other stuff. But you should be able to use it as a graph plus a couple of methods inherited from the Graph::TransitiveClosure::Matrix class. Object Methods These are only the methods 'native' to the class: see Graph::TransitiveClosure::Matrix for more. is_transitive($g) Return true if the Graph $g is transitive. transitive_closure_matrix Return the transitive closure matrix of the transitive closure object. INTERNALS The transitive closure matrix is stored as an attribute of the graph called "_tcm", and any methods not found in the graph class are searched in the transitive closure matrix class. perl v5.10.0 2009-01-17 Graph::TransitiveClosure(3pm)
All times are GMT -4. The time now is 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy