OK, Kaj I traced it through. Thanks. Some versions of gnuplot gracefully flush their files when hit with a HUP signal; others do not. For closing down the process, I got rid of the Mr. Nice Guy step (emitting an "exit" command down the gnuplot pipe) and jumped straight to sending a HUP signal, since Microsoft Windows doesn't guarantee asynchronous writing to the pipe. Gnuplot 4.4, in particular, seems to not play as nicely as one might like with that mode of shutdown.
The candidate 1.2 release is now on Github (https://github.com/drzowie/PDL-Graphics-Gnuplot), and once I've heard back from Rob about his particular issues on Microsoft Windows, I'll push it to CPAN (probably late tonight). If anyone else would like to bang on it and gripe, now is a good time. Cheers, Craig On Oct 17, 2012, at 3:16 PM, Kaj Wiik wrote: > On Wed, Oct 17, 2012 at 6:01 PM, Craig DeForest > <[email protected]> wrote: > >> I'm a bit puzzled, though, about the issues you're having on Linux. Using >> 1.1, I can't duplicate it on either MacOS or Fedora. > > Using perlbrew I (foolishly..) installed a bleeding edge perl version, > I now installed last stable (v5.16.1) to test this out.. > >> I tried: >> perl -e 'use PDL; use PDL::Graphics::Gnuplot; $w=gpwin(x11); >> $w->plot(xvals(5)**2);' > OK, persistent window. > >> perl -e 'use PDL; use PDL::Graphics::Gnuplot; $w=gpwin(wxt); >> $w->plot(xvals(5)**2);' > Non-persistent window. > >> perl -e 'use PDL; use PDL::Graphics::Gnuplot; >> $w=gpwin(pdf,output=>'foo.pdf'); $w->plot(xvals(5)**2);' > Zero sized pdf. > >> perl -e 'use PDL; use PDL::Graphics::Gnuplot; gplot(xvals(5)**2);' > Non-persistent window. > >> perl -e 'use PDL; use PDL::Graphics::Gnuplot; gplot(terminal=>'pdf', >> output=>"bar.pdf",xvals(5)**2); > Zero sized pdf. > > Running 'use PDL; use PDL::Graphics::Gnuplot; gplot(xvals(5)**2);' in > pdl2 produces persistent window but 'use PDL; use > PDL::Graphics::Gnuplot; gplot(terminal=>'pdf', > output=>"bar.pdf",xvals(5)**2);' still produces zero-sized pdf. > > Another strange thing: > pdl> help PDL::Graphics::Gnuplot > No PDL docs for 'PDL::Graphics::Gnuplot'. Using 'whatis'. (Try > 'apropos PDL::Graphics::Gnuplot'?) > > but > pdl> #man PDL::Graphics::Gnuplot > produces the manpage. > > I switched off perlbrew and tried with stock Ubuntu 12.04 perl > (v5.14.2), results are exactly the same... > > Gnuplot is Version 4.4 patchlevel 3. > > Thanks, > Kaj > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
