PDL-Graphics-Gnuplot
view release on metacpan or search on metacpan
gplot( with => 'image', sin(rvals(51,51)) );
Here the only given ndarray has dimensions (21,21). This is a 3D plot, so we are
exactly 2 ndarrays short. Thus, PDL::Graphics::Gnuplot generates an implicit
domain, corresponding to a 21-by-21 grid.
C<PDL::Graphics::Gnuplot> requires explicit separators between tuples
for different plots, so it is always clear from the arguments you pass
in just how many columns you are supplying. For example,
C<plot($a,$b)> will plot C<$b> vs. C<$a>. If you actually want to
plot an overlay of both C<$a> and C<$b> against array index, you want
C<plot($a,{},$b)> instead. The C<{}> is a hash ref containing a
collection of all the curve options that you are changing between
the two curves -- in this case, zero of them.
=head2 Images
PDL::Graphics::Gnuplot supports four styles of image plot, via the "with" curve option.
The "image" style accepts a single image plane and displays it using
the palette (pseudocolor map) that is specified in the plot options
lib/PDL/Demos/Gnuplot.pm view on Meta::CPAN
$w->plot( {tit=>'Default color map'}, with=>'image', $im );
$w->plot( {tit=>'Grayscale', clut=>'gray'}, with=>'image', $im );
$w->plot( {tit=>'heat map', clut=>'heat1'}, with=>'image', $im );
$w->plot( {tit=>'3d perspective', trid=>1}, with=>'pm3d', $im );
$w->end_multi;
|],
[act => q|
# You can indpendently specify color and position on surface plots,
# and can overlay multiple types of plot -- even in 3D.
#
$rv = rvals(101,101)/5; $im = cos($rv)/($rv+2.5);
$grad = sumover $im->range([[-1,0],[1,0]],[$im->dims],'e') * pdl(-1,1);
$im2 = $im->indexND(ndcoords(26,26)*4); # subsample $im
$w->reset;
$w->options( trid=>1, hidden=>'front', colorbox=>0, clut=>'heat1' );
$w->multiplot(layout=>[2,2]);
lib/PDL/Graphics/Gnuplot.pm view on Meta::CPAN
gplot( with => 'image', sin(rvals(51,51)) );
Here the only given ndarray has dimensions (21,21). This is a 3D plot, so we are
exactly 2 ndarrays short. Thus, PDL::Graphics::Gnuplot generates an implicit
domain, corresponding to a 21-by-21 grid.
C<PDL::Graphics::Gnuplot> requires explicit separators between tuples
for different plots, so it is always clear from the arguments you pass
in just how many columns you are supplying. For example,
C<plot($a,$b)> will plot C<$b> vs. C<$a>. If you actually want to
plot an overlay of both C<$a> and C<$b> against array index, you want
C<plot($a,{},$b)> instead. The C<{}> is a hash ref containing a
collection of all the curve options that you are changing between
the two curves -- in this case, zero of them.
=head2 Images
PDL::Graphics::Gnuplot supports four styles of image plot, via the "with" curve option.
The "image" style accepts a single image plane and displays it using
the palette (pseudocolor map) that is specified in the plot options
( run in 1.741 second using v1.01-cache-2.11-cpan-49f99fa48dc )