Hi, Kaj,

I'm glad you like what you see.

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.  I tried:

        perl -e 'use PDL; use PDL::Graphics::Gnuplot; $w=gpwin(x11); 
$w->plot(xvals(5)**2);'

        perl -e 'use PDL; use PDL::Graphics::Gnuplot; $w=gpwin(wxt); 
$w->plot(xvals(5)**2);'

        perl -e 'use PDL; use PDL::Graphics::Gnuplot; 
$w=gpwin(pdf,output=>'foo.pdf'); $w->plot(xvals(5)**2);'

        perl -e 'use PDL; use PDL::Graphics::Gnuplot; gplot(xvals(5)**2);'

        perl -e 'use PDL; use PDL::Graphics::Gnuplot; gplot(terminal=>'pdf', 
output=>"bar.pdf",xvals(5)**2);

and they all produced persistent windows (for the interactive and default 
devices) or complete PDF files (for the pdf devices)..


Would you kindly send a script that fails for you, and/or describe your system 
more completely?

Cheers,
Craig

On Oct 17, 2012, at 3:08 AM, Kaj Wiik wrote:

> Hi!
> 
> Thanks for a fast reply!
> 
> On Wed, Oct 17, 2012 at 1:29 AM, Craig DeForest
> <[email protected]> wrote:
>> I'm not sure how to fix this.  The issue is that gnuplot itself doesn't 
>> close out the PDF file until it
>> encounters a reset or a change of terminal.  You can make it purge the file 
>> with ->reset() or ->restart(),
> Ah, yes, I missed that...
> 
> However, none of
> #undef $w;
> #$w->close;
> #$w->reset;
> #$w->restart;
> 
> work, unfortunately. What works is {bottomcmds => 'set terminal wxt'} or
> $w->output(png);
> $w->replot;
> 
> Without ->replot the file is truncated, strange... I can certainly
> live with this fix.
> 
> 1.1 brought also the Windows window closing problem to Linux, so you
> have to use <STDIN> at the end in order to keep the window open, maybe
> this is related to the truncation bug (or feature :-)).
> 
> BTW, thanks for the great tutorial video, it was the catalyst to start
> using P::G::G!
> 
> Still have to learn how to plot plain contours of scattered data with
> decent labels...
> 
> Cheers,
> Kaj
> 


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to