Code Monkey home page Code Monkey logo

Comments (4)

drzowie avatar drzowie commented on September 26, 2024

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

from pdl-graphics-simple.

aero avatar aero commented on September 26, 2024

(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])

from pdl-graphics-simple.

aero avatar aero commented on September 26, 2024

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;

from pdl-graphics-simple.

drzowie avatar drzowie commented on September 26, 2024

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

from pdl-graphics-simple.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.