| 1 | use strict; use warnings; |
| 2 | use Test::More; |
| 3 | use Config; |
| 4 | # Stop f77-linking causing spurious undefined symbols (alpha) |
| 5 | $ENV{'PERL_DL_NONLAZY'}=0 if $Config{'osname'} eq "dec_osf"; |
| 6 | require PGPLOT; |
| 7 | |
| 8 | my $dev = $ENV{PGPLOT_DEV} || '/NULL'; |
| 9 | |
| 10 | $ENV{PGPLOT_XW_WIDTH}=0.3; |
| 11 | |
| 12 | note "Testing scalars in array routines"; |
| 13 | |
| 14 | PGPLOT::pgbegin(0,$dev,1,1); # Open plot device |
| 15 | PGPLOT::pgscf(2); |
| 16 | PGPLOT::pgslw(4); |
| 17 | PGPLOT::pgsch(1.6); |
| 18 | PGPLOT::pgenv(10.0,30.0,-2.0,6.0,0,0); |
| 19 | PGPLOT::pgsci(6); |
| 20 | PGPLOT::pglabel("X axis \\gP","Y axis \\gF","Top Label \\gW"); |
| 21 | PGPLOT::pgsci(7); |
| 22 | PGPLOT::pgbbuf(); |
| 23 | |
| 24 | for(my $i=0; $i<10; $i++) { |
| 25 | my $x = $i+15; |
| 26 | my $y = $i-1; |
| 27 | my $e = 0.9; |
| 28 | my $x1 = $x - $e; |
| 29 | my $x2 = $x + 2.0* $e; |
| 30 | my $y1 = $y - 0.7* $e; |
| 31 | my $y2 = $y + 0.3* $e; |
| 32 | PGPLOT::pgsci(7); |
| 33 | PGPLOT::pgpoint(1,$x,$y,$i+5); |
| 34 | PGPLOT::pgsci(3); |
| 35 | PGPLOT::pgerrb(3,1,$x,$y,4,3.0); |
| 36 | PGPLOT::pgsci(2); |
| 37 | PGPLOT::pgerrx(1,$x1,$x2,$y,1); |
| 38 | PGPLOT::pgerry(1,$x,$y2,$y1,.1); |
| 39 | } |
| 40 | |
| 41 | PGPLOT::pgebuf(); |
| 42 | PGPLOT::pgiden(); |
| 43 | PGPLOT::pgend(); |
| 44 | |
| 45 | pass; |
| 46 | done_testing; |