From: Bruno P. <bru...@cl...> - 2006-09-29 07:30:39
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Thanks, Hazen! That's what I was looking for!<br> <br> I've found it in "The PLplot Plotting Library / Programmer's Reference Manual - by MJ LeBrun & G. Furnish"<br> 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<br> the polygon.<br> <br> Do anyone know a more PDL oriented reference manual? (the description of the module in cpan is a bit rough...)<br> <br> best,<br> <br> Bruno<br> <br> <a class="moz-txt-link-abbreviated" href="mailto:hba...@ma...">hba...@ma...</a> a écrit : <blockquote cite="mid...@ma..." type="cite"><br> On Sep 28, 2006, at 5:47 AM, Bruno Picard wrote: <br> <br> <blockquote type="cite"> Fast: <br> Is there a plplot equivalent to the matlab function FILL?: <br> FILL Filled 2-D polygons. <br> FILL(X,Y,C) fills the 2-D polygon defined by vectors X and Y <br> with the color specified by C. The vertices of the polygon <br> are specified by pairs of components of X and Y. If necessary, <br> the polygon is closed by connecting the last vertex to the first. <br> </blockquote> <br> I believe that the function you seek is called plfill. <br> <br> An example using the PDL interface: <br> <br> #!/usr/bin/perl -w <br> <br> use strict; <br> use PDL; <br> use PDL::Graphics::PLplot; <br> <br> plspage(0, 0, 300, 300, 0, 0); <br> plinit(); <br> pladv(0); <br> plvsta(); <br> plwind(0.0, 4.0, 0.0, 4.0); <br> plbox(0.0, 0, 0.0, 0, "bcnst", "bcnstv"); <br> <br> plcol0(2); <br> my $x = pdl(1.0, 1.0, 2.0, 2.5); <br> my $y = pdl(1.0, 2.2, 2.1, 1.0); <br> plfill($x, $y); <br> <br> plend(); <br> <br> <br> 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). <br> <br> best, <br> -Hazen <br> <br> <br> <br> <br> <br> </blockquote> <br> <div class="moz-signature">-- <br> <div align="center"><u>____________________________________________________</u> <br> <font face="Verdana" size="2">Dr. Bruno Picard<br> Dép. Traitement de la Mesure et Segment Sol <br> (Data Analysis and Ground Processing Unit) <br> CLS<br> Dir. Océanographie Spatiale<br> 8-10 rue Hermès, 31520 Ramonville Saint Agne, France<br> <br> Tél: (+33)5.61.39.37.37, Fax: (+33)5.61.39.37.82<br> Mél: <a href="mailto:bru...@cl...">bru...@cl...</a><br> Toile : <a href="http://julie-et-bruno.9online.fr/nono/cadrenono.html" eudora="autourl">http://julie-et-bruno.9online.fr/nono/cadrenono.html</a><br> </font><u>____________________________________________________</u><br> <img src="cid:par...@cl..."><br> </div> </div> </body> </html> |