![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Xi Graphics, Inc. Releases Wall Display Graphics Support Software - PR Newswire (pres | iBot | UNIX and Linux RSS News | 0 | 07-17-2007 08:30 AM |
| Print a Graphics File using a SCO Unix Command | Steve_93630 | UNIX for Dummies Questions & Answers | 0 | 12-06-2006 06:48 PM |
| sed not outputting last line of input file | 2reperry | Shell Programming and Scripting | 3 | 12-16-2005 12:51 PM |
| PHP Outputting finite amount of lines from a file | pondlife | Shell Programming and Scripting | 1 | 10-26-2005 12:44 PM |
| Merge Graphics with text file | schaganti | Windows & DOS: Issues & Discussions | 6 | 11-08-2004 09:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Perl GD::Graph and outputting to a graphics file
To successfully export a perl GD::Graph object to a graphics file (e.g. a .png file), do you do the following ? Code:
# Set graph data $graph->set(....); $graph->plot(\@graph_data); open(IMG,'>file.png') or die $!; binmode IMG; print IMG $graph->png; close IMG; Reason Im asking is because the resulting .png file cannot be opened (even with the .png viewer packages being installed) regards James |
|
||||
|
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); |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|