Thanks, Hazen! That's what I was looking for!

I've found it in "The PLplot Plotting Library / Programmer's Reference Manual - by MJ LeBrun & G. Furnish"
but this manual is C&Fortran oriented and plfill is only descibe with the "n" argument which refers to the vertices to be applied in
the polygon.

Do anyone know a more PDL oriented reference manual? (the description of the module in cpan is a bit rough...)


Bruno a écrit :

On Sep 28, 2006, at 5:47 AM, Bruno Picard wrote:

Is there a plplot equivalent to the matlab function FILL?:
FILL Filled 2-D polygons.
    FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y
    with the color specified by C.  The vertices of the polygon
    are specified by pairs of components of X and Y.  If necessary,
    the polygon is closed by connecting the last vertex to the first.

I believe that the function you seek is called plfill.

An example using the PDL interface:

#!/usr/bin/perl -w

use strict;
use PDL;
use PDL::Graphics::PLplot;

plspage(0, 0, 300, 300, 0, 0);
plwind(0.0, 4.0, 0.0, 4.0);
plbox(0.0, 0, 0.0, 0, "bcnst", "bcnstv");

my $x = pdl(1.0, 1.0, 2.0, 2.5);
my $y = pdl(1.0, 2.2, 2.1, 1.0);
plfill($x, $y);


The polygon is automatically closed and is drawn with the current color. Also, note that the PDL interface automatically fills in the "n" in plfill(n,x,y).


Dr. Bruno Picard
Dép. Traitement de la Mesure et Segment Sol
(Data Analysis and Ground Processing Unit)  
Dir.  Océanographie Spatiale
8-10 rue Hermès, 31520 Ramonville Saint Agne, France

Tél: (+33), Fax: (+33)
Toile :