Closed aero closed 11 years ago
Thanks, aero!
Hmmm, it would be helpful to see why PGPLOT is failing to load.
(1) please find the error message for PGPLOT. You can do this with:
pdl> use PDL::Graphics::Simple; pdl> $w=pgswin(engine=>'PGPLOT'); # should fail pdl> print $PDL::Graphics::Simple::mods->{pgplot}->{msg};
(2) Does 'use PDL::Graphics::PGPLOT::Window' work properly on your system?
Cheers, Craig
(1)
pdl> use PDL::Graphics::Simple;
pdl> $w=pgswin(engine=>'PGPLOT'); # should fail <-- Can't see any error message
pdl> print $PDL::Graphics::Simple::mods->{pgplot}->{msg};
Use of uninitialized value in print at (eval 472) line 5, <IN> line 3.
(2) yes, This code works well.
pdl> use PDL::Graphics::PGPLOT::Window
pdl> $win = pgwin();
pdl> $win->line([1,2,3],[1,2,3])
Hi again. I solved the problem. On windows, PDL uses http://spdg1.sci.shizuoka.ac.jp/grwinlib/english/ for PGPLOT drawing canvas. GrWinC's PGPLOT device names on Windows are GW and CGW.
This is patch for that.
--- C:\strawberry-perl-5.16.3.1-32bit\perl\site\lib\PDL\Graphics\Simple\PGPLOT.pm.org Tue Mar 26 07:29:04 2013
+++ C:\strawberry-perl-5.16.3.1-32bit\perl\site\lib\PDL\Graphics\Simple\PGPLOT.pm Wed Mar 27 16:37:13 2013
@@ -63,6 +63,10 @@
$mod->{disp_dev} = 'XWINDOW';
} elsif($mod->{devices}->{'XSERVE'} ) {
$mod->{disp_dev} = 'XSERVE';
+ } elsif($mod->{devices}->{'CGW'} ) {
+ $mod->{disp_dev} = 'CGW';
+ } elsif($mod->{devices}->{'GW'} ) {
+ $mod->{disp_dev} = 'GW';
} else {
$mod->{ok} = 0;
return 0;
Terrific! Thanks very much, Aero! I've included your patch (or a facsimile) and fixed a related wart at the same time. I also gave you collaborator access to the tree, so you can push things up yourself if the mood takes you.
Warm regards, Craig
HI I forcely installed (because there are some test error) PDL::Graphics::Simple on Windows strawberry perl.
I tried simple example, but it can't find existing PGPLOT engine.