File Coverage

blib/lib/Graphics/GnuplotIF.pm
Criterion Covered Total %
statement 27 281 9.6
branch 0 104 0.0
condition 0 45 0.0
subroutine 10 34 29.4
pod 23 23 100.0
total 60 487 12.3


line stmt bran cond sub pod time code
1             #
2             #===============================================================================
3             #
4             # FILE: GnuplotIF.pm
5             #
6             # DESCRIPTION: A simple and easy to use Perl interface to gnuplot.
7             # (see POD below)
8             #
9             # FILES: ---
10             # BUGS: ---
11             # NOTES: ---
12             # AUTHOR: Dr. Fritz Mehner (fgm), mehner.fritz@web.de
13             # VERSION: 1.0
14             # CREATED: 02.01.2016 11:31
15             # VERSION: see $VERSION below
16             # CREATED: 16.07.2005 13:43:11 CEST
17             # REVISION: ---
18             #===============================================================================
19              
20 2     2   104664 use strict;
  2         4  
  2         75  
21              
22             package Graphics::GnuplotIF;
23              
24 2     2   9 use strict;
  2         4  
  2         38  
25 2     2   10 use warnings;
  2         11  
  2         51  
26 2     2   10 use Carp;
  2         3  
  2         156  
27 2     2   10 use Cwd;
  2         3  
  2         125  
28 2     2   10 use File::Spec;
  2         4  
  2         53  
29 2     2   1712 use IO::Handle;
  2         13973  
  2         119  
30              
31             our $VERSION = '1.8'; # version number
32              
33 2     2   12 use base qw(Exporter);
  2         4  
  2         206  
34 2     2   11 use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS);
  2         3  
  2         9620  
35              
36             # Symbols to be exported by default
37             @EXPORT_OK = ( 'GnuplotIF' );
38              
39             #---------------------------------------------------------------------------
40             # Code common to gnuplot_plot_xy and gnuplot_plot_y to allow user-specified
41             # titles set by gnuplot_set_plot_titles. This code assumes the plot titles
42             # were all set in the command to the literal text "", without any
43             # surrounding quotes. This function replaces that text.
44             #---------------------------------------------------------------------------
45             my $private_apply_plot_titles = sub {
46             my ($self, $cmd_ref) = @_;
47             my $default_plot_title = q{-}; # Title if user did not specify one
48             if (defined $self->{plot_titles} ) {
49             # Substitute each plot title sequentially with the user-supplied value
50             for my $plot_title (@{$self->{plot_titles}}) {
51             if ( !defined $plot_title ) {
52             $plot_title = $default_plot_title;
53             }
54             ${$cmd_ref} =~ s/title /title "$plot_title"/;
55             }
56             }
57              
58             # Substitute any plot titles we did not already catch globally
59             ${$cmd_ref} =~ s/title /title "$default_plot_title"/g;
60             };
61              
62             #---------------------------------------------------------------------------
63             # Code generates a file comment for a plot script.
64             #---------------------------------------------------------------------------
65             my $private_plot_script_header = sub {
66             my ( $self ) = @_;
67             my $localtime = scalar localtime;
68              
69             my $comment;
70             ($comment = <<"END") =~ s/^\s+//gm;
71             #
72             # This file is a GNUPLOT plot script.
73             # It was generated automatically by '${0}'
74             # using the Graphics::GnuplotIF extension to perl.
75             # Creation time : ${localtime}
76             #
77             END
78              
79             $self->gnuplot_cmd( $comment );
80             return;
81             };
82              
83             #---------------------------------------------------------------------------
84             # warn if unix and there is no graphic display
85             #---------------------------------------------------------------------------
86             if (($^O ne 'MSWin32') and ($^O ne 'cygwin')) {
87             if ( ! $ENV{'DISPLAY'} ) {
88             warn "Graphics::GnuplotIF : cannot find environment variable DISPLAY \n"
89             }
90             }
91              
92             #=== FUNCTION ================================================================
93             # NAME: new
94             # DESCRIPTION: constructor
95             # PARAMETER 1: anonymous hash containing some plot parameter (defaults shown):
96             # style => "lines"
97             # title => "",
98             # xlabel => "",
99             # ylabel => "",
100             # xrange => [],
101             # yrange => [],
102             # scriptfile => "",
103             # persist => 0,
104             # objectname => "",
105             # RETURNS: object reference
106             #===============================================================================
107             {
108             my $object_number = 0; # number of objects created
109              
110             sub new {
111              
112 0     0 1   my ( $class, %args ) = @_;
113              
114 0           my $self = {
115             program => 'gnuplot', # something like 'C:\gnuplot\binaries\gnuplot.exe' on Windows
116             style => 'lines',
117             title => q{},
118             xlabel => q{},
119             ylabel => q{},
120             xrange => [],
121             yrange => [],
122             plot_titles => [],
123             scriptfile => q{},
124             persist => 0,
125             objectname => q{},
126             silent_pause => 1,
127             plot_also => 0,
128             no_error_log => 0,
129             %args,
130             __pausetime => -1,
131             __pausemess => q{},
132             __objectnumber => ++$object_number,
133             __plotnumber => 1,
134             __error_log => q{},
135             __iohandle_pipe => undef,
136             __iohandle_file => undef,
137             };
138             ## if {program} is a fully resolved path and the gnuplot
139             ## executable is installed someplace that has a space in it,
140             ## such as "/home/bruce/a b" or "C:\Program Files\Gnuplot",
141             ## the space will confuse the system call to open the pipe,
142             ## very likely resulting in an error like "Couldn't write to
143             ## pipe: Broken pipe at ..."
144             ##
145             ## a solution to this is to "escape" the space by surrounding
146             ## the executable name with double quotes. This method of
147             ## escaping the space is chosen because it works on both
148             ## unix-like and Windows. Take care, though, not to duplicate
149             ## the double quotes, on the off chance that the caller
150             ## supplies them.
151 0 0         $self->{program} = q{"}.$self->{program} if $self->{program} !~ m{\A"};
152 0 0         $self->{program} = $self->{program}.q{"} if $self->{program} !~ m{"\z};
153              
154 0           bless $self, $class ;
155              
156             # let plot windows survive after gnuplot exits
157 0           my $persist = q{};
158 0 0         if ( $self->{persist} == 1 ) {
159 0           $persist = '-persist';
160             }
161              
162             ## if the current working directory has a space in it, such as
163             ## "/home/bruce/a b", the space will confuse the system call
164             ## to open the pipe, very likely resulting in an error like
165             ## "Couldn't write to pipe: Broken pipe at ..."
166             ##
167             ## a solution to this is to "escape" the space by surrounding
168             ## the log file name with double quotes. This method of
169             ## specifying the fully resolved log file location /and/
170             ## escaping the space is chosen because it works on both
171             ## unix-like and Windows.
172             ##
173             ## Using Path::Class would be great, but File::Spec is a
174             ## standard module
175             $self->{__error_log} =
176 0           q{"} .
177             File::Spec->catfile(cwd(), ".gnuplot.${$}.${object_number}.stderr.log") .
178             q{"};
179              
180             #-------------------------------------------------------------------------------
181             # open pipe
182             #-------------------------------------------------------------------------------
183 0 0 0       if ( $self->{scriptfile} eq q{} || ( $self->{scriptfile} ne q{} && $self->{plot_also} != 0 ) ) {
      0        
184 0 0         if ( $self->{no_error_log} ) {
185 0 0         open $self->{__iohandle_pipe}, '|- ', $self->{program}." ${persist}"
186             or die "\n$0 : failed to open pipe to \"gnuplot\" : $!\n";
187             } else {
188 0 0         open $self->{__iohandle_pipe}, '|- ', $self->{program}." ${persist} 2> $self->{__error_log}"
189             or die "\n$0 : failed to open pipe to \"gnuplot\" : $!\n";
190             }
191 0           $self->{__iohandle_pipe}->autoflush(1);
192             }
193             #-------------------------------------------------------------------------------
194             # open script file
195             #-------------------------------------------------------------------------------
196 0 0         if ( $self->{scriptfile} ne q{} ) {
197             open $self->{__iohandle_file}, '>', $self->{scriptfile}
198 0 0         or die "\n$0 : failed to open file \"$self->{scriptfile}\" : $!\n";
199             }
200              
201 0           $self->$private_plot_script_header();
202 0           $self->gnuplot_set_style ( $self->{style } );
203 0           $self->gnuplot_set_title ( $self->{title } );
204 0           $self->gnuplot_set_xlabel( $self->{xlabel} );
205 0           $self->gnuplot_set_ylabel( $self->{ylabel} );
206 0           $self->gnuplot_set_xrange( @{$self->{xrange}} );
  0            
207 0           $self->gnuplot_set_yrange( @{$self->{yrange}} );
  0            
208              
209 0           return $self;
210             } # ---------- end of subroutine new ----------
211             }
212              
213             #=== CLASS METHOD ============================================================
214             # NAME: GnuplotIF
215             # PURPOSE: constructor - short form
216             # PARAMETERS: see new
217             #===============================================================================
218             sub GnuplotIF {
219 0     0 1   my @args = @_;
220 0           return __PACKAGE__->new(@args);
221             } # ---------- end of subroutine GnuplotIF ----------
222              
223             #=== CLASS METHOD ============================================================
224             # NAME: DESTROY
225             # PURPOSE: destructor - close pipe or file
226             # PARAMETERS: ---
227             #===============================================================================
228             sub DESTROY {
229 0     0     my $self = shift;
230             #---------------------------------------------------------------------------
231             # close pipe to gnuplot / close the script file
232             #---------------------------------------------------------------------------
233 0 0 0       if ( defined $self->{__iohandle_pipe} && !close $self->{__iohandle_pipe} ) {
234 0           print { *STDERR } "Graphics::GnuplotIF (object $self->{__objectnumber}): "
  0            
235             ."problem closing communication to gnuplot\n";
236             }
237 0 0 0       if ( defined $self->{__iohandle_file} && !close $self->{__iohandle_file} ) {
238 0           print { *STDERR } "Graphics::GnuplotIF (object $self->{__objectnumber}): "
  0            
239             ."problem closing file $self->{scriptfile}\n";
240             }
241             #---------------------------------------------------------------------------
242             # remove empty error logfiles, if any
243             #---------------------------------------------------------------------------
244 0           my @stat = stat $self->{__error_log};
245              
246 0 0 0       if ( defined $stat[7] && $stat[7]==0 ) {
247             unlink $self->{__error_log}
248 0 0         or croak "Couldn't unlink $self->{__error_log}: $!"
249             }
250 0           return;
251             } # ---------- end of subroutine DESTROY ----------
252              
253             #=== CLASS METHOD ============================================================
254             # NAME: gnuplot_set_style
255             # PURPOSE: Sets one of the allowed line styles in a plot command.
256             # PARAMETERS: plotstyle (string)
257             # RETURNS: ---
258             # SEE ALSO: new()
259             #===============================================================================
260             {
261             my %linestyles = # allowed line styles
262             (
263             boxes => q{},
264             dots => q{},
265             filledcurves=> q{},
266             fsteps => q{},
267             histeps => q{},
268             impulses => q{},
269             lines => q{},
270             linespoints => q{},
271             points => q{},
272             steps => q{},
273             );
274              
275             sub gnuplot_set_style {
276 0     0 1   my $self = shift;
277 0           my $style = shift;
278 0 0 0       if ( defined $style && exists $linestyles{$style} ) {
279 0           $self->{style} = $style;
280             }
281 0           return;
282             } # ---------- end of subroutine gnuplot_set_style ----------
283             }
284              
285             #=== CLASS METHOD ============================================================
286             # NAME: gnuplot_plot_y
287             # PURPOSE: Plot one or more arrays over 0, 1, 2, 3, ...
288             # PARAMETERS: array reference(s)
289             # RETURNS: ---
290             #===============================================================================
291             sub gnuplot_plot_y {
292 0     0 1   my ( $self, @yref ) = @_;
293 0           my $parnr = 0;
294 0           my $cmd = " '-' with $self->{style} title ,\\\n" x (scalar @yref);
295 0           $cmd =~ s/,\\$//s;
296 0           $self->$private_apply_plot_titles(\$cmd); # Honor gnuplot_set_plot_titles
297 0 0         return $self if $cmd eq q{};
298              
299 0           $self->gnuplot_cmd( "plot \\\n$cmd\n" );
300              
301 0           foreach my $item ( @yref ) {
302 0           $parnr++;
303 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_y : $parnr. "
304             ."argument not an array reference\n"
305             if ref($item) ne 'ARRAY';
306 0           $self->gnuplot_cmd( join( "\n", @{$item}), 'e' );
  0            
307             } # ----- end foreach -----
308 0           $self->{__plotnumber}++;
309 0           return $self;
310             } # ---------- end of subroutine gnuplot_plot_y ----------
311              
312             #=== CLASS METHOD ============================================================
313             # NAME: gnuplot_plot_xy
314             # PURPOSE: x-y-plot(s)
315             # PARAMETERS: 1. array reference : x-values
316             # 2. array reference : y-values
317             # ...
318             # RETURNS: ---
319             # DESCRIPTION: Takes two or more array references. The first array is assumed
320             # to contain the x-values for the following function values.
321             #===============================================================================
322             sub gnuplot_plot_xy {
323 0     0 1   my ( $self, $xref, @yref ) = @_;
324 0           my $parnr = 1;
325 0           my $cmd = " '-' using 1:2 with $self->{style} title ,\\\n" x (scalar @yref);
326 0           $cmd =~ s/,\\\n$//s;
327 0           $self->$private_apply_plot_titles(\$cmd); # Honor gnuplot_set_plot_titles
328 0 0         return $self if $cmd eq q{};
329              
330 0           $self->gnuplot_cmd( "plot \\\n$cmd\n" );
331              
332 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_xy : $parnr. "
333             ."argument not an array reference\n"
334             if ref($xref) ne 'ARRAY';
335              
336 0           foreach my $j ( 0..$#yref ) {
337 0           $parnr++;
338 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_xy - "
339             ."$parnr. argument not an array reference\n"
340             if ref($yref[$j]) ne 'ARRAY';
341              
342             # there may be lesser y-values than x-values
343              
344 0 0         my $min = $#{$xref} < $#{$yref[$j]} ? $#{$xref} : $#{$yref[$j]};
  0            
  0            
  0            
  0            
345 0           foreach my $i ( 0..$min ) {
346 0           $self->gnuplot_cmd( "$$xref[$i] $yref[$j]->[$i]" );
347             }
348 0           $self->gnuplot_cmd( 'e' );
349             }
350 0           $self->{__plotnumber}++;
351 0           return $self;
352             } # ---------- end of subroutine gnuplot_plot_xy ----------
353              
354             #=== CLASS METHOD ============================================================
355             # NAME: gnuplot_plot_many
356             # PURPOSE: x-y-plot(s) not sharing an x-axis
357             # PARAMETERS: 1. array reference1 : x-values
358             # 2. array reference1 : y-values
359             # (3. array reference2 : x-values)
360             # (4. array reference2 : y-values)
361             # ...
362             # RETURNS: ---
363             # DESCRIPTION: Takes pairs of array references. The first array in each pair
364             # is assumed to contain the x-values and the second pair is
365             # assumed to contain y-values
366             #===============================================================================
367             sub gnuplot_plot_many {
368 0     0 1   my ( $self, @array_refs ) = @_;
369              
370 0           my $parnr = 0;
371 0           my $cmd = " '-' using 1:2 with $self->{style} title ,\\\n" x
372             ( ( scalar @array_refs ) / 2 );
373 0           $cmd =~ s/,\\\n$//s;
374 0           $self->$private_apply_plot_titles( \$cmd ); # Honor gnuplot_set_plot_titles
375 0 0         return $self if $cmd eq q{};
376              
377 0           $self->gnuplot_cmd("plot \\\n$cmd\n");
378              
379 0           while (@array_refs) {
380 0           my $xxr = shift @array_refs;
381 0           $parnr++;
382 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_many - "
383             . "$parnr. argument not an array reference\n"
384             if ref($xxr) ne 'ARRAY';
385 0           my $yyr = shift @array_refs;
386 0           $parnr++;
387 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_many - "
388             . "$parnr. argument not an array reference\n"
389             if ref($yyr) ne 'ARRAY';
390              
391             # there may be fewer y-values than x-values
392              
393 0 0         my $min = $#{$xxr} < $#{$yyr} ? $#{$xxr} : $#{$yyr};
  0            
  0            
  0            
  0            
394 0           foreach my $i ( 0 .. $min ) {
395 0           $self->gnuplot_cmd("$$xxr[$i] $$yyr[$i]");
396             }
397 0           $self->gnuplot_cmd('e');
398             }
399 0           $self->{__plotnumber}++;
400 0           return $self;
401             } # ---------- end of subroutine gnuplot_plot_many ----------
402              
403             #=== CLASS METHOD ============================================================
404             # NAME: gnuplot_plot_xy_style
405             # PURPOSE: x-y-plot(s) with each graph using individual settings
406             # PARAMETERS: 1. array reference : x-values
407             # 2. hash reference : (y-values, y-style)
408             # ...
409             # RETURNS: ---
410             # DESCRIPTION: Takes one array reference and one or more hash references.
411             # The first array is assumed to contain the x-values for the
412             # following function values. The following hashes are assumed
413             # to contain pairs of values and settings.
414             #===============================================================================
415             sub gnuplot_plot_xy_style {
416 0     0 1   my ( $self, $xref, @yref ) = @_;
417 0           my $parnr = 1;
418 0           my ( $cmd, @cmd );
419              
420 0           foreach my $j ( 0..$#yref ) {
421             die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_xy_style - "
422             .($parnr + $j + 1).". argument not a suitable hash reference\n"
423             if ! (ref($yref[$j]) eq 'HASH'
424 0 0 0       && exists $yref[$j]->{'style_spec'} && exists $yref[$j]->{'y_values'});
      0        
425              
426 0           push @cmd, " '-' using 1:2 with $yref[$j]->{'style_spec'} title ";
427             }
428 0           $cmd = join ", \\\n", @cmd;
429 0           $self->$private_apply_plot_titles(\$cmd); # Honor gnuplot_set_plot_titles
430 0 0         return $self if $cmd eq q{};
431              
432 0           $self->gnuplot_cmd( "plot \\\n$cmd" );
433              
434 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_xy_style : $parnr. "
435             ."argument not an array reference\n"
436             if ref($xref) ne 'ARRAY';
437              
438 0           foreach my $j ( 0..$#yref ) {
439 0           $parnr++;
440             die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_xy_style - "
441             ."$parnr. argument is missing an array reference\n"
442 0 0         if ref($yref[$j]->{'y_values'}) ne 'ARRAY';
443              
444             # there may be lesser y-values than x-values
445              
446 0           my $min = $#{$xref} < $#{$yref[$j]->{'y_values'}}
  0            
447 0           ? $#{$xref}
448 0 0         : $#{$yref[$j]->{'y_values'}};
  0            
449 0           foreach my $i ( 0..$min ) {
450 0           $self->gnuplot_cmd( "$$xref[$i] $yref[$j]->{'y_values'}->[$i]" );
451             }
452 0           $self->gnuplot_cmd( 'e' );
453             }
454 0           $self->{__plotnumber}++;
455 0           return $self;
456             } # ---------- end of subroutine gnuplot_plot_xy_style ----------
457              
458             #=== CLASS METHOD ============================================================
459             # NAME: gnuplot_plot_many_style
460             # PURPOSE: x-y-plot(s) not sharing an x-axis using individual settings
461             # PARAMETERS: 1. hash reference1 : (x-values, y-values, y-style)
462             # 2. hash reference2 : (x-values, y-values, y-style)
463             # ...
464             # RETURNS: ---
465             # DESCRIPTION: Takes array of hash references. The hashes are assumed
466             # to contain x- and y-values and settings.
467             #===============================================================================
468             sub gnuplot_plot_many_style {
469 0     0 1   my ( $self, @hash_refs ) = @_;
470 0           my $parnr = 0;
471 0           my ( $cmd, @cmd );
472              
473 0           foreach my $rh (@hash_refs) {
474 0           $parnr++;
475             die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_many_style - "
476             .($parnr).". argument not a suitable hash reference\n"
477             if ! ( ref($rh) eq 'HASH'
478             && exists $rh->{'style_spec'}
479             && exists $rh->{'x_values'}
480 0 0 0       && exists $rh->{'y_values'}
      0        
      0        
481             );
482 0           my $style = $rh->{'style_spec'};
483 0           push @cmd, " '-' using 1:2 with $style title ";
484             };
485 0           $cmd = join ", \\\n", @cmd;
486 0           $self->$private_apply_plot_titles(\$cmd); # Honor gnuplot_set_plot_titles
487 0 0         return $self if $cmd eq q{};
488 0           $self->gnuplot_cmd( "plot \\\n$cmd\n" );
489              
490 0           $parnr = 0;
491 0           foreach my $rh (@hash_refs) {
492 0           my $xref = $rh->{'x_values'};
493 0           my $yref = $rh->{'y_values'};
494 0           $parnr++;
495 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_many_style - "
496             ."$parnr. 'x_values' argument not an array reference\n"
497             if ref($xref) ne 'ARRAY';
498 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_many_style - "
499             ."$parnr. 'y_values' argument not an array reference\n"
500             if ref($yref) ne 'ARRAY';
501              
502             # there may be fewer y-values than x-values
503 0 0         my $min = $#{$xref} < $#{$yref} ? $#{$xref} : $#{$yref};
  0            
  0            
  0            
  0            
504 0           foreach my $i ( 0..$min ) {
505 0           $self->gnuplot_cmd( "$$xref[$i] $$yref[$i]" );
506             }
507 0           $self->gnuplot_cmd( 'e' );
508             }
509 0           $self->{__plotnumber}++;
510 0           return $self;
511             } # ---------- end of subroutine gnuplot_plot_many_style ----------
512              
513             #=== CLASS METHOD ============================================================
514             # NAME: gnuplot_plot_equation
515             # PURPOSE: Plot one or more functions described by strings.
516             # PARAMETERS: strings describing functions
517             # RETURNS: ---
518             #===============================================================================
519             sub gnuplot_plot_equation {
520 0     0 1   my ( $self, @equations ) = @_;
521 0           my $leftside;
522             my @leftside;
523              
524 0           foreach my $equ ( @equations ) {
525 0           $self->gnuplot_cmd( "$equ" );
526 0           ( $leftside ) = split /=/, $equ;
527 0           push @leftside, $leftside;
528             } # ----- end foreach -----
529 0           @leftside = map {$_." with $self->{style}"} @leftside;
  0            
530 0           $leftside = join ', ', @leftside;
531 0 0         return $self if $leftside eq q{};
532 0           $self->gnuplot_cmd( "plot $leftside" );
533 0           $self->{__plotnumber}++;
534 0           return $self;
535             } # ---------- end of subroutine gnuplot_plot_equation ----------
536              
537             #=== CLASS METHOD ============================================================
538             # NAME: gnuplot_plot_3d
539             # PURPOSE: Draw 3-d plots.
540             # PARAMETERS: Reference to a 2-D-matrix containing the z-values.
541             # RETURNS: ---
542             #===============================================================================
543             sub gnuplot_plot_3d {
544 0     0 1   my ( $self, $arrayref ) = @_;
545 0           my $parnr = 0;
546 0           my $cmd = " '-' matrix with $self->{style} title ," ;
547 0           $cmd =~ s/,$//;
548 0           $self->$private_apply_plot_titles(\$cmd); # Honor gnuplot_set_plot_titles
549 0 0         return $self if $cmd eq q{};
550              
551 0           $self->gnuplot_cmd( "splot $cmd" );
552              
553 0 0         die "Graphics::GnuplotIF (object $self->{__objectnumber}): gnuplot_plot_3d : "
554             ."argument not an array reference\n"
555             if ref($arrayref) ne 'ARRAY';
556              
557 0           foreach my $i ( @{$arrayref} ) {
  0            
558 0           $self->gnuplot_cmd( join q{ }, @{$i} ) ;
  0            
559             }
560 0           $self->gnuplot_cmd( "\ne" );
561              
562 0           $self->{__plotnumber}++;
563 0           return $self;
564             } # ---------- end of subroutine gnuplot_plot_3d ----------
565              
566             #=== CLASS METHOD ============================================================
567             # NAME: gnuplot_pause
568             # PURPOSE: Wait a specified amount of time.
569             # PARAMETERS: 1. parameter (optional): time value (seconds):
570             # -1 do not wait
571             # 0 wait for a carriage return
572             # >0 wait the specified number of seconds
573             # 2. parameter (optional): text
574             # message to display
575             # RETURNS: ---
576             #===============================================================================
577             sub gnuplot_pause {
578 0     0 1   my ( $self, $pause, $message ) = @_;
579              
580 0           $self->{__pausetime} = 0; # default: wait for a carriage return
581 0 0 0       if ( defined $pause && $pause =~ m/^[+-]?(\d+|\d+\.\d*|\d*\.\d+)$/x ) {
582 0           $self->{__pausetime} = $pause;
583             }
584 0 0 0       if ( defined $message && $message ne q{} ) {
585 0           $self->{__pausemess} = "\"$message\"";
586             }
587 0           my $msg0 = "Graphics::GnuplotIF (object $self->{__objectnumber}): $self->{__pausemess} -- ";
588 0           my $msg1 = "hit RETURN to continue \n";
589 0           my $msg2 = "wait $self->{__pausetime} second(s) \n";
590 0 0         if ( $self->{__pausetime} == 0 ) {
    0          
591 0           print "$msg0$msg1";
592 0           my $dummy = <>; # hit RETURN to go on
593             }
594             elsif ( $self->{__pausetime} < 0 ) {
595 0           $self->gnuplot_cmd("\n");
596             }
597             else {
598 0 0         if ( $self->{silent_pause} == 1 ) {
599 0           print "$msg0$msg2";
600             }
601 0           $self->gnuplot_cmd( "pause $self->{__pausetime}" );
602             }
603 0           return $self;
604             } # ---------- end of subroutine gnuplot_pause ----------
605              
606             #=== CLASS METHOD ============================================================
607             # NAME: gnuplot_cmd
608             # PURPOSE: Pass on one or more Gnuplot commands.
609             # PARAMETERS: string(s)
610             # RETURNS: ---
611             #===============================================================================
612             sub gnuplot_cmd {
613 0     0 1   my ($self, @commands) = @_;
614 0           @commands = map {$_."\n"} @commands;
  0            
615 0 0         if ( defined $self->{__iohandle_pipe} ) {
616 0 0         print { $self->{__iohandle_pipe} } @commands
  0            
617             or croak "Couldn't write to pipe: $!";
618             }
619 0 0         if ( defined $self->{__iohandle_file} ) {
620 0 0         print { $self->{__iohandle_file} } @commands
  0            
621             or croak "Couldn't write to file $!";
622             }
623 0           return $self;
624             } # ---------- end of subroutine gnuplot_cmd ----------
625              
626             #=== CLASS METHOD ============================================================
627             # NAME: gnuplot_hardcopy
628             # PURPOSE: Write a plot into a file.
629             # PARAMETERS: 1. file name
630             # 2. gnuplot terminal type
631             # 3. terminal settings (optional)
632             # RETURNS: ---
633             #===============================================================================
634             sub gnuplot_hardcopy {
635 0     0 1   my ($self, $filename, $terminal, @keywords) = @_;
636              
637             # remember the current terminal including its settings
638 0           $self->gnuplot_cmd( 'set terminal push' );
639              
640 0           my $set_terminal = "set terminal $terminal @keywords\n";
641 0           my $set_output = "set output \"$filename\"\n";
642 0           $self->gnuplot_cmd( $set_terminal, $set_output );
643 0           return $self;
644             } # ---------- end of subroutine gnuplot_hardcopy ----------
645              
646             #=== CLASS METHOD ============================================================
647             # NAME: gnuplot_restore_terminal
648             # PURPOSE: Restore the terminal settings before the last hardcopy.
649             # PARAMETERS: ---
650             # RETURNS: ---
651             #===============================================================================
652             sub gnuplot_restore_terminal {
653 0     0 1   my ($self) = @_;
654 0           $self->gnuplot_cmd( 'set output', 'set terminal pop' );
655 0           return $self;
656             } # ---------- end of subroutine gnuplot_restore_terminal ----------
657              
658             #=== CLASS METHOD ============================================================
659             # NAME: gnuplot_set_plot_titles
660             # PURPOSE: Sets the list of titles used in the key.
661             # PARAMETERS: array of titles
662             # RETURNS: ---
663             #===============================================================================
664             sub gnuplot_set_plot_titles {
665 0     0 1   my ( $self, @user_plot_titles ) = @_;
666 0           my @plot_titles = @user_plot_titles;
667 0           $self->{plot_titles} = \@plot_titles;
668 0           return $self;
669             }
670              
671             #=== CLASS METHOD ============================================================
672             # NAME: gnuplot_reset
673             # PURPOSE: Set all options set with the set command to their
674             # gnuplot default values.
675             # PARAMETERS: ---
676             # RETURNS: ---
677             #===============================================================================
678             sub gnuplot_reset {
679 0     0 1   my ($self) = @_;
680 0           $self->{plot_titles} = undef;
681 0           $self->gnuplot_cmd( 'reset' );
682 0           return $self;
683             } # ---------- end of subroutine gnuplot_reset ----------
684              
685             #=== CLASS METHOD ============================================================
686             # NAME: gnuplot_set_title
687             # PURPOSE: Sets the plot title.
688             # PARAMETERS: title (string)
689             # RETURNS: ---
690             #===============================================================================
691             sub gnuplot_set_title {
692 0     0 1   my ( $self, $title ) = @_;
693 0 0         if ( defined $title ) {
694 0           $self->gnuplot_cmd( "set title '$title'" );
695             };
696 0           return $self;
697             } # ---------- end of subroutine gnuplot_set_title ----------
698              
699             #=== CLASS METHOD ============================================================
700             # NAME: gnuplot_set_xlabel
701             # PURPOSE: Sets the x axis label.
702             # PARAMETERS: string
703             # RETURNS: ---
704             #===============================================================================
705             sub gnuplot_set_xlabel {
706 0     0 1   my ( $self, $xlabel ) = @_;
707 0 0         if ( defined $xlabel ) {
708 0           $self->gnuplot_cmd( "set xlabel \"$xlabel\"" );
709             };
710 0           return $self;
711             } # ---------- end of subroutine gnuplot_set_xlabel ----------
712              
713             #=== CLASS METHOD ============================================================
714             # NAME: gnuplot_set_ylabel
715             # PURPOSE: Sets the y axis label.
716             # PARAMETERS: string
717             # RETURNS: ---
718             #===============================================================================
719             sub gnuplot_set_ylabel {
720 0     0 1   my ( $self, $ylabel ) = @_;
721 0 0         if ( defined $ylabel ) {
722 0           $self->gnuplot_cmd( "set ylabel \"$ylabel\"" );
723             };
724 0           return $self;
725             } # ---------- end of subroutine gnuplot_set_ylabel ----------
726              
727             #=== CLASS METHOD ============================================================
728             # NAME: gnuplot_set_xrange
729             # PURPOSE: Sets the horizontal range that will be displayed.
730             # PARAMETERS: 1. parameter: range, left value
731             # 2. parameter: range, right value
732             # RETURNS: ---
733             #===============================================================================
734             sub gnuplot_set_xrange {
735 0     0 1   my ( $self, $xleft, $xright ) = @_;
736 0 0 0       if ( defined $xleft && defined $xright ) {
737 0           $self->gnuplot_cmd( "set xrange [ $xleft : $xright ]" );
738             }
739 0           return $self;
740             } # ---------- end of subroutine gnuplot_set_xrange ----------
741              
742             #=== CLASS METHOD ============================================================
743             # NAME: gnuplot_set_yrange
744             # PURPOSE: Sets the vertical range that will be displayed.
745             # PARAMETERS: 1. parameter: range, low value
746             # 2. parameter: range, high value
747             # RETURNS: ---
748             #===============================================================================
749             sub gnuplot_set_yrange {
750 0     0 1   my ( $self, $yleft, $yright ) = @_;
751 0 0 0       if ( defined $yleft && defined $yright ) {
752 0           $self->gnuplot_cmd( "set yrange [ $yleft : $yright ]" );
753             }
754 0           return $self;
755             } # ---------- end of subroutine gnuplot_set_yrange ----------
756              
757             #=== CLASS METHOD ============================================================
758             # NAME: gnuplot_get_plotnumber
759             # PURPOSE: Get the (internal) plot number
760             # PARAMETERS: ---
761             # RETURNS: object number
762             #===============================================================================
763             sub gnuplot_get_plotnumber {
764 0     0 1   my ( $self ) = @_;
765 0           return $self->{__plotnumber};
766             } # ---------- end of subroutine gnuplot_get_plotnumber ----------
767              
768             #=== CLASS METHOD ============================================================
769             # NAME: gnuplot_get_object_id
770             # PURPOSE: Get the (internal) object number
771             # PARAMETERS: ---
772             # RETURNS: object number
773             #===============================================================================
774             sub gnuplot_get_object_id {
775 0     0 1   my ( $self ) = @_;
776 0 0         if ( wantarray ) {
777 0           return ( $self->{__objectnumber}, $self->{objectname} );
778             }
779             else {
780 0           return $self->{__objectnumber};
781             }
782             } # ---------- end of subroutine gnuplot_get_object_id ----------
783              
784       2     END { } # module clean-up code
785              
786             1;
787              
788             #__END__
789             #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
790             # Module Documentation
791             #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
792              
793             =head1 NAME
794              
795             Graphics::GnuplotIF - A dynamic Perl interface to gnuplot
796              
797             =head1 VERSION
798              
799             This documentation refers to Graphics::GnuplotIF version 1.6
800              
801             =head1 SYNOPSIS
802              
803             use Graphics::GnuplotIF qw(GnuplotIF);
804              
805             my @x = ( -2, -1.50, -1, -0.50, 0, 0.50, 1, 1.50, 2 ); # x values
806             my @y1 = ( 4, 2.25, 1, 0.25, 0, 0.25, 1, 2.25, 4 ); # function 1
807             my @y2 = ( 2, 0.25, -1, -1.75, -2, -1.75, -1, 0.25, 2 ); # function 2
808              
809             my $plot1 = Graphics::GnuplotIF->new(title => "line", style => "points");
810              
811             $plot1->gnuplot_plot_y( \@x ); # plot 9 points over 0..8
812              
813             $plot1->gnuplot_pause( ); # hit RETURN to continue
814              
815             $plot1->gnuplot_set_title( "parabola" ); # new title
816             $plot1->gnuplot_set_style( "lines" ); # new line style
817              
818             $plot1->gnuplot_plot_xy( \@x, \@y1, \@y2 ); # plot 1: y1, y2 over x
819             $plot1->gnuplot_plot_many( \@x, \@y1, \@x, \@y2 ); # plot 1: y1 - x, y2 - x
820              
821             my $plot2 = Graphics::GnuplotIF->new; # new plot object
822              
823             $plot2->gnuplot_set_xrange( 0, 4 ); # set x range
824             $plot2->gnuplot_set_yrange( -2, 2 ); # set y range
825             $plot2->gnuplot_cmd( "set grid" ); # send a gnuplot command
826             $plot2->gnuplot_plot_equation( # 3 equations in one plot
827             "y1(x) = sin(x)",
828             "y2(x) = cos(x)",
829             "y3(x) = sin(x)/x" );
830              
831             $plot2->gnuplot_pause( ); # hit RETURN to continue
832              
833             $plot2->gnuplot_plot_equation( # rewrite plot 2
834             "y4(x) = 2*exp(-x)*sin(4*x)" );
835              
836             $plot2->gnuplot_pause( ); # hit RETURN to continue
837              
838             my $plot3 = GnuplotIF; # new plot object
839              
840             my @xyz = ( # 2-D-matrix, z-values
841             [0, 1, 4, 9],
842             [1, 2, 6, 15],
843             [4, 6, 12, 27],
844             [9, 15, 27, 54],
845             );
846              
847             $plot3->gnuplot_cmd( "set grid" ); # send a gnuplot command
848             $plot3->gnuplot_set_plot_titles("surface"); # set legend
849             $plot3->gnuplot_plot_3d( \@xyz ); # start 3-D-plot
850             $plot3->gnuplot_pause( ); # hit RETURN to continue
851              
852             =head1 DESCRIPTION
853              
854             Graphics::GnuplotIF is a simple and easy to use dynamic Perl interface to
855             B. B is a freely available, command-driven graphical display
856             tool for Unix. It compiles and works quite well on a number of Unix flavours
857             as well as other operating systems, including Windows with C.
858              
859             This module enables sending display requests asynchronously to B
860             through simple Perl subroutine calls.
861              
862             A gnuplot session is an instance of class Graphics::GnuplotIF. The constructor
863             starts B as a separate process for each session. The plot commands are
864             send through a I. The graphical output from B will be displayed
865             immediately.
866              
867             Several independent plots can be started from one script. Each plot has its
868             own pipe. All pipes will be closed automatically by the destructor when the
869             script terminates. The B processes terminate when the corresponding
870             pipes are closed. Their graphical output will now disappear (but see parameter
871             L).
872              
873             Graphics::GnuplotIF is similar to C< gnuplot_i >, a C interface to B
874             ( http://ndevilla.free.fr/gnuplot/ ), and to C< gnuplot_i++ >, a C++ interface
875             to B ( http://jijo.cjb.net/code/cc++ ).
876              
877             =head1 SUBROUTINES/METHODS
878              
879             An object of this class represents an interface to a running B
880             process. During the creation of an object such an process will be started for
881             each such object. Communication is done through an unidirectional pipe; the
882             resulting stream is write-only.
883              
884             Most methods return a reference to the Graphics::GnuplotIF object, allowing
885             method calls to be chained like so:
886              
887             $plot1 -> gnuplot_plot_xy(\@x, \@y)
888             -> gnuplot_reset;
889              
890             The exception to this are L and
891             L, which are used to obtain specific scalar
892             values.
893              
894             =head2 new
895              
896             The constructor creates a new B session object, referenced by a
897             handle:
898              
899             $plot1 = Graphics::GnuplotIF->new( );
900              
901             A few named arguments can be passed as key - value pairs (here shown with
902             their default values):
903              
904             program => 'gnuplot' # fully qualified name of the Gnuplot executable
905             style => 'lines', # one of the gnuplot line styles (see below)
906             title => '', # string
907             xlabel => 'x', # string
908             ylabel => 'y', # string
909             xrange => [], # array reference; autoscaling, if empty
910             xrange => [], # array reference; autoscaling, if empty
911             plot_titles => [], # array of strings; titles used in the legend
912             scriptfile => '', # write all plot commands to the specified file
913             plot_also => 0, # write all plot commands to the specified file,
914             # in addition show the plots
915             persist => 0, # let plot windows survive after gnuplot exits
916             # 0 : close / 1 : survive
917             objectname => '', # an optional name for the object
918             silent_pause => 1, # 0 suppress message from gnuplot_pause()
919             no_error_log => 0, # suppress ".gnuplot.${$}.${object_number}.stderr.log" file
920              
921             These attributes are stored in each object.
922              
923             Allowed line styles are
924              
925             boxes dots filledcurves fsteps histeps
926             impulses lines linespoints points steps
927              
928             The generated B commands can be stored to a file instead of beeing
929             executed immediately. This file can be used as input to B, e.g.
930              
931             gnuplot < function_set_1.gnuplot
932              
933             A script file can also be used for checking the commands send to B.
934              
935             The objects are automatically deleted by a destructor. The destructor closes
936             the pipe to the B process belonging to that object. The B
937             process will also terminate and remove the graphic output. The termination can
938             be controlled by the method L | gnuplot_pause> .
939              
940             The program argument is provided to allow Graphics::GnuplotIF to be
941             used with Gnuplot on Windows using C, a compilation
942             which includes code that emulates a unix pipe.
943              
944             =head2 GnuplotIF
945              
946             The short form of the constructor above (L|new>):
947              
948             use Graphics::GnuplotIF qw(GnuplotIF);
949              
950             $plot1 = GnuplotIF;
951              
952             This subroutine is exported only on request.
953              
954             =head2 gnuplot_plot_y
955              
956             $plot1->gnuplot_plot_y( \@y1, \@y2 );
957              
958             C takes one or more array references and plots the values over
959             the x-values 0, 1, 2, 3, ...
960              
961             =head2 gnuplot_plot_xy
962              
963             $plot1->gnuplot_plot_xy( \@x, \@y1, \@y2 );
964              
965             C takes two or more array references. The first array is
966             assumed to contain the x-values for the following function values.
967              
968             =head2 gnuplot_plot_xy_style
969              
970             %y1 = ( 'y_values' => \@y1, 'style_spec' => "lines lw 3" );
971             %y2 = ( 'y_values' => \@y2,
972             'style_spec' => "points pointtype 4 pointsize 5" );
973              
974             $plot1->gnuplot_plot_xy_style( \@x, \%y1, \%y2 );
975              
976             C takes one array reference and one or more hash
977             references. The first array is assumed to contain the x-values for the
978             following function values. The following hashes are assumed to contain pairs of
979             y-values and individual style specifications for use in the plot command. The
980             'style_spec' settings are placed between C and C of B<gnuplot>'s </td> </tr> <tr> <td class="h" > <a name="981">981</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<plot> command. </td> </tr> <tr> <td class="h" > <a name="982">982</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="983">983</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_plot_many </td> </tr> <tr> <td class="h" > <a name="984">984</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="985">985</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_xy( \@x1, \@y1, \@x2, \@y2 ); </td> </tr> <tr> <td class="h" > <a name="986">986</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="987">987</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_plot_many> takes pairs of array references. Each pair represents a </td> </tr> <tr> <td class="h" > <a name="988">988</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> function and is a reference to the arrays of x- and y-values for that function. </td> </tr> <tr> <td class="h" > <a name="989">989</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="990">990</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_plot_many_style </td> </tr> <tr> <td class="h" > <a name="991">991</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="992">992</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> %f1 = ( 'x_values' => \@x1, 'y_values' => \@y1, </td> </tr> <tr> <td class="h" > <a name="993">993</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'style_spec' => "lines lw 3" ); </td> </tr> <tr> <td class="h" > <a name="994">994</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> %f2 = ( 'x_values' => \@x2, 'y_values' => \@y2, </td> </tr> <tr> <td class="h" > <a name="995">995</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'style_spec' => "points pointtype 4 pointsize 5" ); </td> </tr> <tr> <td class="h" > <a name="996">996</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="997">997</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_many_style( \%f1, \%f2 ); </td> </tr> <tr> <td class="h" > <a name="998">998</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="999">999</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_plot_many_style> takes one or more hash references. The hashes are </td> </tr> <tr> <td class="h" > <a name="1000">1000</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> assumed to contain array referenses to x-values and y-values and individual </td> </tr> <tr> <td class="h" > <a name="1001">1001</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> style specifications for use in the plot command. The 'style_spec' settings are </td> </tr> <tr> <td class="h" > <a name="1002">1002</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> placed between C<with> and C<title> of B<gnuplot>'s C<plot> command. </td> </tr> <tr> <td class="h" > <a name="1003">1003</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1004">1004</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_plot_equation </td> </tr> <tr> <td class="h" > <a name="1005">1005</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1006">1006</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot2->gnuplot_plot_equation( # 3 equations in one plot </td> </tr> <tr> <td class="h" > <a name="1007">1007</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "y1(x) = sin(x)", </td> </tr> <tr> <td class="h" > <a name="1008">1008</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "y2(x) = cos(x)", </td> </tr> <tr> <td class="h" > <a name="1009">1009</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> "y3(x) = sin(x)/x" ); </td> </tr> <tr> <td class="h" > <a name="1010">1010</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1011">1011</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_plot_equation> takes one or more B<gnuplot> function descriptions as </td> </tr> <tr> <td class="h" > <a name="1012">1012</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> strings. The plot ranges can be controlled by </td> </tr> <tr> <td class="h" > <a name="1013">1013</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> L<C<gnuplot_set_xrange>|gnuplot_set_xrange> and </td> </tr> <tr> <td class="h" > <a name="1014">1014</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> L<C<gnuplot_set_yrange>|gnuplot_set_yrange> . </td> </tr> <tr> <td class="h" > <a name="1015">1015</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1016">1016</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_plot_3d </td> </tr> <tr> <td class="h" > <a name="1017">1017</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1018">1018</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot2->gnuplot_plot_3d( \@array ); # 3-D-plot </td> </tr> <tr> <td class="h" > <a name="1019">1019</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1020">1020</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_plot_3d> takes one reference to an 2-D-array of z-values. </td> </tr> <tr> <td class="h" > <a name="1021">1021</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1022">1022</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_pause </td> </tr> <tr> <td class="h" > <a name="1023">1023</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1024">1024</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_pause( [time] [,text] ); </td> </tr> <tr> <td class="h" > <a name="1025">1025</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1026">1026</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This is an emulation of the B<gnuplot> C<pause> command. It displays any text </td> </tr> <tr> <td class="h" > <a name="1027">1027</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> associated with the command and waits a specified amount of time or until the </td> </tr> <tr> <td class="h" > <a name="1028">1028</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> carriage return is pressed. The message can be suppressed by </td> </tr> <tr> <td class="h" > <a name="1029">1029</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1030">1030</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> silent_pause => 0 </td> </tr> <tr> <td class="h" > <a name="1031">1031</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1032">1032</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> given to the constructor (see L<new | new>). </td> </tr> <tr> <td class="h" > <a name="1033">1033</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1034">1034</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<time> may be any constant or expression. Choosing 0 (default) will </td> </tr> <tr> <td class="h" > <a name="1035">1035</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> wait until a carriage return is hit, a negative value won't pause at </td> </tr> <tr> <td class="h" > <a name="1036">1036</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> all, and a positive number will wait the specified number of seconds. </td> </tr> <tr> <td class="h" > <a name="1037">1037</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1038">1038</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The time value and the text are stored in the object and reused. A sequence </td> </tr> <tr> <td class="h" > <a name="1039">1039</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> like </td> </tr> <tr> <td class="h" > <a name="1040">1040</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1041">1041</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_y( \@y1 ); </td> </tr> <tr> <td class="h" > <a name="1042">1042</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_pause( 5.5 ); # delay is 5.5 seconds </td> </tr> <tr> <td class="h" > <a name="1043">1043</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1044">1044</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_y( \@y2 ); </td> </tr> <tr> <td class="h" > <a name="1045">1045</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_pause( ); </td> </tr> <tr> <td class="h" > <a name="1046">1046</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1047">1047</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_y( \@y3 ); </td> </tr> <tr> <td class="h" > <a name="1048">1048</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_pause( ); </td> </tr> <tr> <td class="h" > <a name="1049">1049</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1050">1050</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> will display 3 plots with 5.5 seconds delay. </td> </tr> <tr> <td class="h" > <a name="1051">1051</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1052">1052</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1053">1053</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_cmd </td> </tr> <tr> <td class="h" > <a name="1054">1054</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1055">1055</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot2->gnuplot_cmd( 'set grid', </td> </tr> <tr> <td class="h" > <a name="1056">1056</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'set timestamp "%d/%m/%y %H:%M" 0,0 "Helvetica"' </td> </tr> <tr> <td class="h" > <a name="1057">1057</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ); </td> </tr> <tr> <td class="h" > <a name="1058">1058</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1059">1059</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_cmd> can be used to send one or more B<gnuplot> commands, especially </td> </tr> <tr> <td class="h" > <a name="1060">1060</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> those not wrapped by a Graphics::GnuplotIF method. </td> </tr> <tr> <td class="h" > <a name="1061">1061</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1062">1062</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_reset </td> </tr> <tr> <td class="h" > <a name="1063">1063</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1064">1064</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_reset(); </td> </tr> <tr> <td class="h" > <a name="1065">1065</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1066">1066</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Set all options set with the C<set> command to their B<gnuplot> default values. </td> </tr> <tr> <td class="h" > <a name="1067">1067</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1068">1068</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_style </td> </tr> <tr> <td class="h" > <a name="1069">1069</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1070">1070</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_style( "steps" ); # new line style </td> </tr> <tr> <td class="h" > <a name="1071">1071</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1072">1072</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets one of the allowed line styles (see L<new | new>) </td> </tr> <tr> <td class="h" > <a name="1073">1073</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> in a plot command. </td> </tr> <tr> <td class="h" > <a name="1074">1074</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1075">1075</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_title </td> </tr> <tr> <td class="h" > <a name="1076">1076</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1077">1077</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_title("parabola"); # new title </td> </tr> <tr> <td class="h" > <a name="1078">1078</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1079">1079</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the plot title. </td> </tr> <tr> <td class="h" > <a name="1080">1080</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Equivalent to the B<gnuplot> command C<set title "parabola">. </td> </tr> <tr> <td class="h" > <a name="1081">1081</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1082">1082</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_xlabel </td> </tr> <tr> <td class="h" > <a name="1083">1083</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1084">1084</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_xlabel("time (days)"); </td> </tr> <tr> <td class="h" > <a name="1085">1085</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1086">1086</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the x axis label. </td> </tr> <tr> <td class="h" > <a name="1087">1087</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Equivalent to the B<gnuplot> command C<set xlabel "time (days)">. </td> </tr> <tr> <td class="h" > <a name="1088">1088</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1089">1089</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_ylabel </td> </tr> <tr> <td class="h" > <a name="1090">1090</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1091">1091</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_ylabel("bugs fixed"); </td> </tr> <tr> <td class="h" > <a name="1092">1092</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1093">1093</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the y axis label. </td> </tr> <tr> <td class="h" > <a name="1094">1094</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Equivalent to the B<gnuplot> command C<set ylabel "bugs fixed">. </td> </tr> <tr> <td class="h" > <a name="1095">1095</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1096">1096</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_xrange </td> </tr> <tr> <td class="h" > <a name="1097">1097</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1098">1098</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_xrange( left, right ); </td> </tr> <tr> <td class="h" > <a name="1099">1099</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1100">1100</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the horizontal range that will be displayed. </td> </tr> <tr> <td class="h" > <a name="1101">1101</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Equivalent to the B<gnuplot> command C<set xrange [left:right]>. </td> </tr> <tr> <td class="h" > <a name="1102">1102</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1103">1103</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_yrange </td> </tr> <tr> <td class="h" > <a name="1104">1104</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1105">1105</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_yrange( low, high ); </td> </tr> <tr> <td class="h" > <a name="1106">1106</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1107">1107</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the vertical range that will be displayed. </td> </tr> <tr> <td class="h" > <a name="1108">1108</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Equivalent to the B<gnuplot> command C<set yrange [low:high]>. </td> </tr> <tr> <td class="h" > <a name="1109">1109</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1110">1110</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_set_plot_titles </td> </tr> <tr> <td class="h" > <a name="1111">1111</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1112">1112</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_set_plot_titles( @ytitles ); </td> </tr> <tr> <td class="h" > <a name="1113">1113</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1114">1114</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Sets the list of titles used in the key for each of the y-coordinate data sets </td> </tr> <tr> <td class="h" > <a name="1115">1115</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> specified in subsequent calls to gnuplot_plot_xy or gnuplot_plot_y commands. </td> </tr> <tr> <td class="h" > <a name="1116">1116</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This is not equivalent to a complete B<gnuplot> command; rather it adds a </td> </tr> <tr> <td class="h" > <a name="1117">1117</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<title> clause to each data set specified in a B<gnuplot> C<plot> command. </td> </tr> <tr> <td class="h" > <a name="1118">1118</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1119">1119</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_hardcopy </td> </tr> <tr> <td class="h" > <a name="1120">1120</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1121">1121</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot_cmd> can be used to write a plot into a file or make a printable file </td> </tr> <tr> <td class="h" > <a name="1122">1122</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> by setting/resetting the terminal and the output file: </td> </tr> <tr> <td class="h" > <a name="1123">1123</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1124">1124</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_hardcopy( 'function1.gnuplot.ps', </td> </tr> <tr> <td class="h" > <a name="1125">1125</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'postscript', </td> </tr> <tr> <td class="h" > <a name="1126">1126</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'color lw 3' ); </td> </tr> <tr> <td class="h" > <a name="1127">1127</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1128">1128</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_xy( \@x, \@y1, \@y2 ); </td> </tr> <tr> <td class="h" > <a name="1129">1129</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1130">1130</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_restore_terminal(); </td> </tr> <tr> <td class="h" > <a name="1131">1131</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1132">1132</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The 1. parameter is a file name, the 2. parameter is a B<gnuplot> terminal type, </td> </tr> <tr> <td class="h" > <a name="1133">1133</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the 3. parameter is a string with additional terminal parameters (optional). </td> </tr> <tr> <td class="h" > <a name="1134">1134</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The current terminal settings will be saved. </td> </tr> <tr> <td class="h" > <a name="1135">1135</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1136">1136</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_restore_terminal </td> </tr> <tr> <td class="h" > <a name="1137">1137</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1138">1138</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Restores the saved terminal settings after a call to C<gnuplot_hardcopy()>. </td> </tr> <tr> <td class="h" > <a name="1139">1139</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Output will go to C<STDOUT> again. </td> </tr> <tr> <td class="h" > <a name="1140">1140</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1141">1141</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head3 Print a plot directly </td> </tr> <tr> <td class="h" > <a name="1142">1142</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1143">1143</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> A hardcopy can be made with an appropriate output format and a pipe to a </td> </tr> <tr> <td class="h" > <a name="1144">1144</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> printer: </td> </tr> <tr> <td class="h" > <a name="1145">1145</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1146">1146</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_cmd( 'set terminal postscript', </td> </tr> <tr> <td class="h" > <a name="1147">1147</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'set output " | lpr " ' ); </td> </tr> <tr> <td class="h" > <a name="1148">1148</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1149">1149</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_plot_xy( \@x, \@y1, \@y2 ); </td> </tr> <tr> <td class="h" > <a name="1150">1150</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1151">1151</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_cmd( 'set output', </td> </tr> <tr> <td class="h" > <a name="1152">1152</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> 'set terminal x11' ); </td> </tr> <tr> <td class="h" > <a name="1153">1153</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1154">1154</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_get_object_id </td> </tr> <tr> <td class="h" > <a name="1155">1155</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1156">1156</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Get the (internal) object number (and the object name): </td> </tr> <tr> <td class="h" > <a name="1157">1157</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1158">1158</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $obj_number = $plot1->gnuplot_get_object_id(); </td> </tr> <tr> <td class="h" > <a name="1159">1159</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> ($obj_number, $obj_name) = $plot1->gnuplot_get_object_id(); </td> </tr> <tr> <td class="h" > <a name="1160">1160</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1161">1161</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The object number is set automatically by the constructor. The object name can </td> </tr> <tr> <td class="h" > <a name="1162">1162</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> be set by the constructor (objectname => 'MyName'). </td> </tr> <tr> <td class="h" > <a name="1163">1163</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1164">1164</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head2 gnuplot_get_plotnumber </td> </tr> <tr> <td class="h" > <a name="1165">1165</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1166">1166</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Get the (internal) plot number of the B<next> plot: </td> </tr> <tr> <td class="h" > <a name="1167">1167</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1168">1168</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot_number = $plot1->gnuplot_get_plotnumber() </td> </tr> <tr> <td class="h" > <a name="1169">1169</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1170">1170</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The plot number is set automatically by the constructor starting with 1. Each </td> </tr> <tr> <td class="h" > <a name="1171">1171</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> call to </td> </tr> <tr> <td class="h" > <a name="1172">1172</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1173">1173</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_y </td> </tr> <tr> <td class="h" > <a name="1174">1174</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_xy </td> </tr> <tr> <td class="h" > <a name="1175">1175</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_xy_style </td> </tr> <tr> <td class="h" > <a name="1176">1176</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_many </td> </tr> <tr> <td class="h" > <a name="1177">1177</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_many_style </td> </tr> <tr> <td class="h" > <a name="1178">1178</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_equation </td> </tr> <tr> <td class="h" > <a name="1179">1179</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> gnuplot_plot_3d </td> </tr> <tr> <td class="h" > <a name="1180">1180</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1181">1181</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> increments this number by 1. This can be used to identify single plots, e.g. </td> </tr> <tr> <td class="h" > <a name="1182">1182</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> with </td> </tr> <tr> <td class="h" > <a name="1183">1183</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1184">1184</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot->gnuplot_cmd( "set timestamp \"plot number ${plot_number} / %c\"" ); </td> </tr> <tr> <td class="h" > <a name="1185">1185</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1186">1186</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 EXPORTS </td> </tr> <tr> <td class="h" > <a name="1187">1187</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1188">1188</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> B<GnuplotIF> constructor, short form (see L<C<GnuplotIF> | GnuplotIF>). </td> </tr> <tr> <td class="h" > <a name="1189">1189</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1190">1190</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 DIAGNOSTICS </td> </tr> <tr> <td class="h" > <a name="1191">1191</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1192">1192</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Dialog messages and diagnostic messages start with </td> </tr> <tr> <td class="h" > <a name="1193">1193</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C< Graphics::GnuplotIF (object NR): ... > . </td> </tr> <tr> <td class="h" > <a name="1194">1194</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1195">1195</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<NR> is the number of the corresponding Graphics::GnuplotIF object and output </td> </tr> <tr> <td class="h" > <a name="1196">1196</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> stream. NR counts the objects in the order of their generation. </td> </tr> <tr> <td class="h" > <a name="1197">1197</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1198">1198</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The gnuplot messages going to STDERR will be redirected to the file </td> </tr> <tr> <td class="h" > <a name="1199">1199</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<.gnuplot.PPP.OOO.stderr.log>. PPP is the process number, OOO is the number of </td> </tr> <tr> <td class="h" > <a name="1200">1200</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the plot object (see L<C<gnuplot_get_object_id>|gnuplot_get_object_id>). </td> </tr> <tr> <td class="h" > <a name="1201">1201</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1202">1202</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 CONFIGURATION AND ENVIRONMENT </td> </tr> <tr> <td class="h" > <a name="1203">1203</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1204">1204</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The environment variable DISPLAY is checked for the display. </td> </tr> <tr> <td class="h" > <a name="1205">1205</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1206">1206</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 DEPENDENCIES </td> </tr> <tr> <td class="h" > <a name="1207">1207</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1208">1208</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =over 2 </td> </tr> <tr> <td class="h" > <a name="1209">1209</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1210">1210</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1211">1211</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1212">1212</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot> ( http://sourceforge.net/projects/gnuplot ) must be installed. </td> </tr> <tr> <td class="h" > <a name="1213">1213</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1214">1214</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Using Graphics::GnuplotIF on Windows requires having the </td> </tr> <tr> <td class="h" > <a name="1215">1215</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot.exe> version installed. This is the version that emulates a </td> </tr> <tr> <td class="h" > <a name="1216">1216</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> pipe. The Graphics::GnuplotIF object must then be instantiated with </td> </tr> <tr> <td class="h" > <a name="1217">1217</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the C<program> argument, like so: </td> </tr> <tr> <td class="h" > <a name="1218">1218</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1219">1219</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> my $plot = Graphics::GnuplotIF -> new(program => 'C:\gnuplot\binaries\gnuplot.exe'); </td> </tr> <tr> <td class="h" > <a name="1220">1220</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1221">1221</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> A recent compilation of Gnuplot for Windows can be found at </td> </tr> <tr> <td class="h" > <a name="1222">1222</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> SourceForge: L<http://sourceforge.net/projects/gnuplot/files/gnuplot/>. </td> </tr> <tr> <td class="h" > <a name="1223">1223</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1224">1224</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1225">1225</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1226">1226</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The module C<Carp> is used for error handling. </td> </tr> <tr> <td class="h" > <a name="1227">1227</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1228">1228</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =item * </td> </tr> <tr> <td class="h" > <a name="1229">1229</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1230">1230</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> The module C<IO::Handle> is used to handle output pipes. Your operating system </td> </tr> <tr> <td class="h" > <a name="1231">1231</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> must support pipes, of course. </td> </tr> <tr> <td class="h" > <a name="1232">1232</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1233">1233</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =back </td> </tr> <tr> <td class="h" > <a name="1234">1234</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1235">1235</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 INCOMPATIBILITIES </td> </tr> <tr> <td class="h" > <a name="1236">1236</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1237">1237</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> There are no known incompatibilities. </td> </tr> <tr> <td class="h" > <a name="1238">1238</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1239">1239</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 BUGS AND LIMITATIONS </td> </tr> <tr> <td class="h" > <a name="1240">1240</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1241">1241</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_cmd("pause -1"); # send the gnuplot pause command </td> </tr> <tr> <td class="h" > <a name="1242">1242</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1243">1243</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> does not work. Use </td> </tr> <tr> <td class="h" > <a name="1244">1244</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1245">1245</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> $plot1->gnuplot_pause( ); </td> </tr> <tr> <td class="h" > <a name="1246">1246</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1247">1247</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> There are no known bugs in this module. Please report problems to author. </td> </tr> <tr> <td class="h" > <a name="1248">1248</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Patches are welcome. </td> </tr> <tr> <td class="h" > <a name="1249">1249</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1250">1250</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 AUTHOR </td> </tr> <tr> <td class="h" > <a name="1251">1251</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1252">1252</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Dr.-Ing. Fritz Mehner (mehner.fritz@web.de) </td> </tr> <tr> <td class="h" > <a name="1253">1253</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1254">1254</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 CREDITS </td> </tr> <tr> <td class="h" > <a name="1255">1255</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1256">1256</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Stephen Marshall (smarshall at wsi dot com) contributed C<gnuplot_set_plot_titles>. </td> </tr> <tr> <td class="h" > <a name="1257">1257</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1258">1258</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Georg Bauhaus (bauhaus at futureapps dot de) contributed C<gnuplot_plot_xy_style>. </td> </tr> <tr> <td class="h" > <a name="1259">1259</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1260">1260</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Bruce Ravel (bravel at bnl dot gov) contributed C<gnuplot_plot_many> </td> </tr> <tr> <td class="h" > <a name="1261">1261</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> and C<gnuplot_plot_many_style>, made method calls chainable, and added </td> </tr> <tr> <td class="h" > <a name="1262">1262</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Windows support. </td> </tr> <tr> <td class="h" > <a name="1263">1263</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1264">1264</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 LICENSE AND COPYRIGHT </td> </tr> <tr> <td class="h" > <a name="1265">1265</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1266">1266</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> Copyright (C) 2005-2011 by Fritz Mehner </td> </tr> <tr> <td class="h" > <a name="1267">1267</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1268">1268</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> This module is free software; you can redistribute it and/or modify it under </td> </tr> <tr> <td class="h" > <a name="1269">1269</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> the same terms as Perl itself. See perldoc perlartistic. This program is </td> </tr> <tr> <td class="h" > <a name="1270">1270</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; </td> </tr> <tr> <td class="h" > <a name="1271">1271</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> without even the implied warranty of MERCHANTABILITY or FITNESS FOR A </td> </tr> <tr> <td class="h" > <a name="1272">1272</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> PARTICULAR PURPOSE. </td> </tr> <tr> <td class="h" > <a name="1273">1273</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1274">1274</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =head1 SEE ALSO </td> </tr> <tr> <td class="h" > <a name="1275">1275</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1276">1276</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> C<gnuplot(1)>. </td> </tr> <tr> <td class="h" > <a name="1277">1277</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> <tr> <td class="h" > <a name="1278">1278</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s"> =cut </td> </tr> <tr> <td class="h" > <a name="1279">1279</a> </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td >   </td> <td class="s">   </td> </tr> </table> </body> </html>