于 2014/6/27 18:16, xuhaida 写道:
> 于 2014/6/27 16:26, xuhaida 写道:
>> Hi:
>> I'm trying to install the PDL 2.007 in my Window7 (64 bit) desktop,
>> after installing PDL successfully.I use " cpan PDL::Graphics::Simple" to
>> install the module. But test fails for the imag subroutine .I can't see
>> any image in my desktop, Any suggestion?
>>
>> # Image & circles plot
>> eval { $w->plot(with=>'image', rvals(11,11),
>> with=>'circle', xvals(15), xvals(15)*1.5,
>> sin(xvals(15))**2 * 4,
>> {title=>"PDL: $engine engine, image & circle plots (not
>> justified)"}
>> );
>> };
>> ok(!$@, "plot succeeded\n");
>> print $@ if($@);
>> print STDERR qq{
>> Testing $engine engine: You should see a radial 11x11 "target" image
>> and some superimposed "circles". Since the plot is not justified, the
>> pixels in the target image should be oblong and the "circles" should
>> be ellipses. OK? (Y/n) > };
>> $a = get_yn();
>> ok( $a !~ m/^n/i,
>> "image and circles plot looks ok");
>>
>> ##############################
>> # Image & circles plot (justified)
>> eval { $w->plot(with=>'image', rvals(11,11),
>> with=>'circle', xvals(15), xvals(15)*1.5,
>> sin(xvals(15))**2 * 4,
>> {title=>"PDL: $engine engine, image & circle plots
>> (justified)", j=>1}
>> );
>> };
>> ok(!$@, "justified image and circles plot succeeded"); print($@)
>> if($@);
>> print STDERR qq{
>> Testing $engine engine: You should see the same plot as before, but
>> justified. superimposed "circles". Since the plot is justified,
>> the pixels in the target image should be square and the "circles" should
>> really be circles. OK? (Y/n) > };
>>
>> $a = get_yn();
>> ok( $a !~ m/^n/i,
>> "justified image and circles plot looks ok");
>>
>> ##############################
>> # Log scaling
>>
>> eval { $w->plot(with=>'line',xvals(500)+1,{log=>'y',title=>"PDL:
>> $engine engine, Y=X (semilog)"}); };
>> ok(!$@, "log scaling succeeded");
>> print STDERR qq{
>> Testing $engine engine: You should see a simple logarithmically scaled plot,
>> with appropriate title. OK? (Y/n) > };
>>
>> $a = get_yn();
>> ok( $a !~ m/^n/i,
>> "log scaled plot looks OK");
>>
>>
>> ##############################
>> # Text
>>
>> eval { $w->plot(with=>'labels',
>> xvals(5), xvals(5),
>> ["<left-justified","< left-with-spaces",
>> "|centered","|>start with '>'",">right-justified"],
>> {title=>"PDL: $engine engine, text on graph",
>> yrange=>[-1,5] }
>> );
>> };
>> ok( !$@, "labels plot succeeded" );
>> print STDERR qq{
>> Testing $engine engine: You should see "left-justified" text left
>> aligned on x=0, "left-with-spaces" just right of x=1, "centered"
>> centered on x=2, ">start with '>'" centered on x=3, and
>> "right-justified" right-aligned on x=4. OK? (Y/n) > };
>> $a = get_yn();
>> ok( $a !~ m/^n/i,
>> "labels plot looks OK");
>>
>>
>> ##############################
>> # Multiplot
>> eval { $w=new PDL::Graphics::Simple(engine=>$engine, multi=>[2,2]); };
>> ok(!$@, "Multiplot declaration was OK");
>>
>> $w->image( rvals(9,9),{wedge=>1} ); $w->image(
>> -rvals(9,9),{wedge=>1} );
>> $w->image( sequence(9,9) ); $w->image(
>> pdl(xvals(9,9),yvals(9,9),rvals(9,9)) );
>>
>> print STDERR qq{
>> Testing $engine engine: You should see two bullseyes across the top (one in
>> negative print), a gradient at bottom left, and an RGB blur (if supported
>> by the engine - otherwise a modified gradient) at bottom right. The top two
>> panels should have colorbar wedges to the right of the image.
>> OK? (Y/n) > };
>>
>> $a = get_yn();
>> ok($a !~ m/^n/i,
>> "multiplot OK");
>>
>>
>> }
>>
>> }
>>
>>
>> ##############################
>> # Try the simple engine and convenience interfaces...
>>
>> print STDERR<<'FOO';
>>
>> ##############################
>> Convenience interface tests...
>> FOO
>>
>> ok( !defined($PDL::Graphics::Simple::global_object), "Global convenience
>> object not defined" );
>>
>> eval q: $a = xvals(50); lines $a sin($a/3) :;
>> ok(!$@, "simple lines plot succeeded");
>>
>> ok( defined($PDL::Graphics::Simple::global_object), "Global convenience
>> object got spontaneously set" );
>>
>> print STDERR q{
>> test> $a = xvals(50); lines $a sin($a/3);
>> You should see a sine wave... OK? (Y/n) > };
>>
>>
>> $a = get_yn();
>> ok($a !~ m/^n/i, "convenience plot OK");
>>
>> eval q: erase :;
>> ok(!$@, 'erase worked');
>> ok(!defined($PDL::Graphics::Simple::global_object), 'erase erased the global
>> object');
>>
>> ##############################
>> # Test imag
>> $im = 0; # shut up the typo detector
>> $im = 1000 * sin(rvals(100,100)/3) / (rvals(100,100)+30);
>>
>> eval q{ imag $im };
>> ok(!$@, "imag worked with no additional arguments" );
>>
>> print STDERR q{
>> test> $im = 1000 * sin(rvals(100,100)/3) / (rvals(100,100)+30);
>> test> imag $im;
>> You should see a bullseye pattern with a brighter inner ring. OK? (Y/n) > };
>>
>>
>> $a=get_yn();
>> ok($a !~ m/^n/i, "bullseye OK");
>>
>> eval q{ imag $im, {wedge=>1, title=>"Bullseye!"} };
>> ok(!$@, "imag worked with plot options");
>>
>> print STDERR q{
>> test> imag $im, {wedge=>1, title=>"Bullseye!", j=>1};
>> You should see the same image, but with a colorbar wedge on the right; a
>> title
>> up top; and a justified aspect ratio (circular rings). The color scale may
>> be
>> slightly less contrasty than the last frame, because some engines extend the
>> colorbar wedge to round numbers. Ok? (Y/n) > };
>>
>> $a = get_yn();
>> ok($a !~ m/^n/i, "justified bullseye and wedge OK");
>>
>>
>> eval q{ imag $im, 0, 30, {wedge=>1, j=>1} };
>> ok(!$@, "imag worked with bounds");
>>
>> print STDERR q{
>> test> imag $im, 0, 30, {wedge=>1, j=>1};
>> You should see the same image, but with no title and with a tighter
>> dynamic range that cuts off the low values (black rings instead of
>> the fainter parts of the bullseye). Ok? (Y/n) > };
>>
>> $a = get_yn();
>> ok($a !~ m/^n/i, "crange shortcut is OK");
>>
>> eval q{ erase };
>> ok(!$@, "erase executed");
>>
>> print STDERR qq{
>> test> erase
>> The window should have disappeared. Ok? (Y/n) > };
>>
>> $a = get_yn();
>> ok($a !~ m/^n/i, "erase worked");
>>
>> print "End of tests\n";
>>
>>
>>
> I tried PDL::Graphics::Prima, it works fine. Then I installed
> PDL::Graphics::Simple again and saw the images, all tests passed . But
> failed in the installattion because of the following information:
>
>
> Running make install
> Installing C:\strawberry\perl\site\lib\PDL\Graphics\Simple.pm
> Installing C:\strawberry\perl\site\lib\PDL\Graphics\Simple\Gnuplot
> Installing C:\strawberry\perl\site\lib\PDL\Graphics\Simple\PGPLOT.
> Installing C:\strawberry\perl\site\lib\PDL\Graphics\Simple\PLplot.
> Installing C:\strawberry\perl\site\lib\PDL\Graphics\Simple\Prima.p
> Appending installation info to C:\strawberry\perl\lib/perllocal.po
> "Updating PDL documentation database...";
> Can't find string terminator "'" anywhere before EOF at -e line 1.
> dmake.exe: Error code 255, while making 'install'
> ZOWIE/PDL-Graphics-Simple-1.005.tar.gz
> C:\strawberry\c\bin\dmake.exe install UNINST=1 -- NOT OK
> Stopping: 'install' failed for 'PDL::Graphics::Simple'.
> Failed during this command:
> ZOWIE/PDL-Graphics-Simple-1.005.tar.gz : install NO
>
>
> Any more suggestion?
Sorry, PDL::Graphics::Prima works in the perldl. The above bug perhaps
is about POD file.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl