Posted by
September 30, 2008
In I discussed how to call Gnuplot from C and Python language. If you are using Perl, then, here is the script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| #!/usr/bin/perl
# Generate postscript and png plot with GNUplot from Perl
# Author: Ioan Vancea
# Usage: Give "data file" as an argument for script
use strict;
use warnings;
my $file = ARGV[0];
# POSTSCRIPT
open (GNUPLOT, "|gnuplot");
print GNUPLOT <
close(GNUPLOT);
# PNG
open (GNUPLOT, "|gnuplot");
print GNUPLOT <
close(GNUPLOT); |
阅读(1044) | 评论(0) | 转发(0) |