----- Original Message ----- From: "Craig DeForest" <[email protected]>
To: "chm" <[email protected]>
Cc: "Craig DeForest" <[email protected]>; "Sisyphus" <[email protected]>; "[email protected]" <[email protected]>
Sent: Tuesday, December 06, 2011 2:13 AM
Subject: Re: [Perldl] Gnuplot beta test - dist file included in message


Interesting. I wonder if the gnuplot call itself is hanging. Sisyphus, can you try the following on your platform?


 $w = PDL::Gnuplot::Window::new()
 $w->plot(xvals(50)**2)

###############################
pdl> use PDL::Graphics::Gnuplot

pdl> p $PDL::Graphics::Gnuplot::VERSION
0.10ced
pdl> $w=PDL::Gnuplot::Window::new()

pdl> $w->plot(xvals(50)**2)

pdl>
###############################

I gather that's ok.

use PDL::Demos::Screen;
do "Gnuplot_demo.pm";
PDL::Demos::Gnuplot_demo::run();

Are you running this under the pdl2 or perldl shell?

That was a script, though I thought I was getting much the same thing in the pdl2 shell. (Actually, I'm never sure whether I'm using the pdl2 shell or perldl shell - I find them very confusing when things aren't working properly and try to avoid them under those circumstances.)

Anyway, today in the pdl shell (I *think* I've tried both shells), I tried re-running the original demo.

So I entered the first 3 lines:

pdl> use PDL::Demos::Screen;

pdl> do 'Gnuplot_demo.pm';

pdl> PDL::Demos::Gnuplot_demo::run();

And that gave me:
######################################
---- Code:
 # ensure that the module is loaded
 use PDL::Graphics::Gnuplot;

 # Create a Gnuplot object - the default device displays on most
 # operating systems.  (No plot window yet - just the object).
 $w = gpwin();

 # Create variables to plot
 $x = xvals(1000)/1000;
 $y = $x * sin(100 * $x);

 # Generate a line plot.  Plot parameters in front.
$w->lines({title=>" x * sin(100 x) ",xl=>"Ordinate",yl=>"Abscissa"}, $x, $y );

---- Output:
----  (press enter)
######################################

So I pressed enter, and up popped the nice little graph of x * sin(100 * x).

In the console, I also got:

#####################################
OOPS!!! Something went wrong, please make a bug report!: Hmmm, my main Gnuplot p
rocess didn't respond for 5 seconds.
This could be a bug in PDL::Graphics::Gnuplot or gnuplot itself --
although for some terminals (like x11) it could be because of a
slow network.  If you don't think it is a network problem, please
report it as a PDL::Graphics::Gnuplot bug.
at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 256
PDL::Core::barf('Hmmm, my main Gnuplot process didn\'t respond for 5 sec onds.\x{a}...') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnuplot.pm line 38
42
       PDL::Graphics::Gnuplot::_checkpoint('PDL::Graphics::Gnuplot=HASH(0x35357
f4)', 'main', 'printwarnings') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnu
plot.pm line 1456
PDL::Graphics::Gnuplot::plot(undef, undef, 'PDL=SCALAR(0x34785c4)', 'PDL =SCALAR(0x3540aa4)') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnuplot.pm li
ne 1855
PDL::Graphics::Gnuplot::lines(undef, 'HASH(0x353dc0c)', 'PDL=SCALAR(0x34
785c4)', 'PDL=SCALAR(0x3540aa4)') called at (eval 92) line 14
       eval 'package PDL::Demos::Gnuplot_demo; use PDL;
 # ensure that the module is loaded
 use PDL::Graphics::Gnuplot;

 # Create a Gnuplot object - the default device displays on most
 # operating systems.  (No plot window yet - just the object).
 $w = gpwin();

 # Create variables to plot
 $x = xvals(1000)/1000;
 $y = $x * sin(100 * $x);

 # Generate a line plot.  Plot parameters in front.
$w->lines({title=>" x * sin(100 x) ",xl=>"Ordinate",yl=>"Abscissa"}, $x, $y );


;' called at C:/MinGW/perl/site/lib/PDL/Demos/Screen.pm line 42
PDL::Demos::Routines::act('\x{a} # ensure that the module is loaded \x{
a}  use PDL::Graphics::G...') called at Gnuplot_demo.pm line 76
       PDL::Demos::Gnuplot_demo::run() called at (eval 89) line 4
       main::__ANON__() called at C:\MinGW\perl\bin/perldl line 666
       eval {...} called at C:\MinGW\perl\bin/perldl line 666
main::eval_and_report('PDL::Demos::Gnuplot_demo::run();\x{a}') called at
C:\MinGW\perl\bin/perldl line 604
       main::process_input() called at C:\MinGW\perl\bin/perldl line 624
       eval {...} called at C:\MinGW\perl\bin/perldl line 624
at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm) line 256
PDL::Core::barf('Hmmm, my main Gnuplot process didn\'t respond for 5 sec onds.\x{a}...') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnuplot.pm line 38
42
       PDL::Graphics::Gnuplot::_checkpoint('PDL::Graphics::Gnuplot=HASH(0x35357
f4)', 'main', 'printwarnings') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnu
plot.pm line 1456
PDL::Graphics::Gnuplot::plot(undef, undef, 'PDL=SCALAR(0x34785c4)', 'PDL =SCALAR(0x3540aa4)') called at C:/MinGW/perl/site/lib/PDL/Graphics/Gnuplot.pm li
ne 1855
PDL::Graphics::Gnuplot::lines(undef, 'HASH(0x353dc0c)', 'PDL=SCALAR(0x34
785c4)', 'PDL=SCALAR(0x3540aa4)') called at (eval 92) line 14
       eval 'package PDL::Demos::Gnuplot_demo; use PDL;
 # ensure that the module is loaded
 use PDL::Graphics::Gnuplot;

 # Create a Gnuplot object - the default device displays on most
 # operating systems.  (No plot window yet - just the object).
 $w = gpwin();

 # Create variables to plot
 $x = xvals(1000)/1000;
 $y = $x * sin(100 * $x);

 # Generate a line plot.  Plot parameters in front.
$w->lines({title=>" x * sin(100 x) ",xl=>"Ordinate",yl=>"Abscissa"}, $x, $y );


;' called at C:/MinGW/perl/site/lib/PDL/Demos/Screen.pm line 42
PDL::Demos::Routines::act('\x{a} # ensure that the module is loaded \x{
a}  use PDL::Graphics::G...') called at Gnuplot_demo.pm line 76
       PDL::Demos::Gnuplot_demo::run() called at (eval 89) line 4
       main::__ANON__() called at C:\MinGW\perl\bin/perldl line 666
       eval {...} called at C:\MinGW\perl\bin/perldl line 666
main::eval_and_report('PDL::Demos::Gnuplot_demo::run();\x{a}') called at
C:\MinGW\perl\bin/perldl line 604
       main::process_input() called at C:\MinGW\perl\bin/perldl line 624
       eval {...} called at C:\MinGW\perl\bin/perldl line 624

----
---- (press enter)
#####################################

So I pressed enter again and the console changes to:

#####################################
---- Code:

 # You can set persistent plot parameters with "options".
 $w->options(title=>"Two lines", xl=>"Ordinate", yl=>"Abscissa");

 # A two-line plot
 $y2 = sqrt($x) * cos(100*$x);
 $w->lines($x,$y,{},$x,$y2);

---- Output:

#####################################

And there it hangs.
The Gnuplot window does not respond and I can't go any further until I get Windows to close it ... and after that, of course, nothing useful happens. I just get error messages in the console every time I hit enter, until the demo finally concludes.

Cheers,
Rob



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

Reply via email to