Graphics-PLplot

 view release on metacpan or  search on metacpan

PLplot.pm  view on Meta::CPAN

			   plscmap1n
			   plscol0
			   plscolbg
			   plscolor
			   plscompression
			   plsdev
			   plsdidev
			   plsdiori
			   plsdiplt
			   plsdiplz
			   plsesc
			   plsetopt
			   plsfam
			   plsfnam
			   plsmaj
			   plsmin
			   plsori
			   plspage
			   plspause
			   plsstrm
			   plssub
			   plssym
			   plstar
			   plstart
			   plstripa
			   plstripc
			   plstyl
			   plsurf3d
			   plsvpa
			   plsxax
			   plsyax
			   plsym
			   plszax
			   pltext
			   plvasp
			   plvpas
			   plvpor
			   plvsta
			   plw3d
			   plwid
			   plwind
			   plxormod
			   plgFileDevs
			   plgDevs
			   plClearOpts
			   plResetOpts
			   plParseOpts
			   plSetUsage
			   plOptUsage
			   plgfile
			   plsfile
			   plgesc
			   plGetCursor
			   PARSE_FULL
			   PARSE_QUIET
			   PARSE_NODELETE
			   PARSE_SHOWALL
			   PARSE_NODASH
			   PARSE_SKIP
			   MAG_COLOR
			   FACETED
			   SURF_CONT
			   BASE_CONT
			   DRAW_SIDES
			   pl_Alloc2dGrid
			   pl_MinMax2dGrid
			   /],
	       );

# plstrl is not exported since it is not part of the API but needed
# by Starlink::AST. Do not make this part of the public API.

Exporter::export_tags('all');

bootstrap Graphics::PLplot $VERSION;


=head1 HELPER FUNCTIONS

The following perl helper functions are also available:

=over 4

=item B<pl_Alloc2dGrid>

Create a perl 2D array (technically an array of 1-D arrays)
suitable for use in C<plimage>. Returns a reference
to the initialised 2D array. All elements are set to 0.0.

  $ref = pl_Alloc2dGrid( $nx, $ny );

=cut

sub pl_Alloc2dGrid ($$) {
  # Create a 2D perl "array" and initialize with zeroes
  my ($nx, $ny) = @_;
  my @z = ();
  for my $i ( 0 .. ($nx -1 ) ) {
    $z[$i] = [];
    for my $j ( 0.. ($ny - 1 ) ) {
      $z[$i]->[$j] = 0.0;
    }
  }

  return \@z;
}

=item B<pl_MinMax2dGrid>

Given an array of arrays (e.g. like one generated by pl_Alloc2dGrid),
return the min and max data value.

  ($min, $max) = pl_MinMax2dGrid( \@z );

=cut

sub pl_MinMax2dGrid {
  my $z = shift;

  # Make first guess
  my $min = $z->[0][0];



( run in 0.689 second using v1.01-cache-2.11-cpan-2398b32b56e )