Hi, Cliff,
I'm not sure why the opening stuff is failing. The "terminal" complaint has to
do with an API change -- on-the-fly plot options now must be contained in a
hash ref, as in "plot({terminal=>"x11"},...)". Also -- and this probably needs
some dealing with -- setting the terminal is only supported in the constructor,
so you're better off using that:
$w = gpwin('windows');
$w->plot(...);
Cheers,
Craig
On Jan 26, 2012, at 6:29 PM, Clifford Sobchuk wrote:
> Thanks for everyone's help.
> I unzipped and built it again. It works fine now. I think that in my earnest
> to find the problem the first time (and I don't know why it didn't work the
> first time. I think the first time it was the install from cpan. I should've
> realized that the cpan release was different.) I added in a separate line for
> the 'open3(****) if ($^O=~"MSWin32");' effectively including Craig's 'or
> barf' statement always.
>
> PDL 2.4.9 with pdl2 shell and gnuplot!
>
> Also I do get the following error and the wxt window becomes unusable.
> ----------------CODE >>>---------------------------------
> pdl> gplot (xvals(20)**2)
> WARNING: Hmmm, gnuplot didn't respond for 5 seconds. I was expecting to read
> a version number. Ah, well, I'm returning the object anyway -- but don't
> be surprised if it doesn't work.
> Runtime error: PDL: Hmmm, my main Gnuplot process 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.
>
> Caught at file (eval 427), line 5, pkg main
> -------------<<< CODE------------------------------------
>
> It actually popped up immediately. So I don't know why it hasn't responded. I
> thought maybe it was the read portion of the open3(), and tried reverting it
> back to 'undef' as Dima had it. But that didn't work at all. I'll keep
> playing now that I know I can get it to work somewhat.
>
> I also tried setting the "windows" terminal with :
> ----------------CODE >>>---------------------------------
> pdl> $w=gpwin('windows')
> WARNING: Hmmm, gnuplot didn't respond for 5 seconds. I was expecting to read
> a version number. Ah, well, I'm returning the object anyway -- but don't
> be surprised if it doesn't work.
>
> pdl> $w->plot(xvals(20)**2)
> Runtime error: PDL: Hmmm, my main Gnuplot process 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.
>
> Caught at file (eval 439), line 5, pkg main
> -------------<<< CODE------------------------------------
>
> But although the process shows up in the process list, no window is
> displayed. It did come up once, but I have never gotten it to return. I have
> tried the code to make a png and although gnuplot process showed up, no plot
> was created.
> ----------------CODE >>>---------------------------------
> pdl> use PDL::Graphics::Gnuplot qw(plot)
>
> pdl> $x=xvals(20)**2
>
> pdl> plot (terminal=>'png',output=>'test.png',$x)
> WARNING: Hmmm, gnuplot didn't respond for 5 seconds. I was expecting to read
> a version number. Ah, well, I'm returning the object anyway -- but don't
> be surprised if it doesn't work.
> Runtime error: No curve option found that matches 'terminal'
> -------------<<< CODE------------------------------------
>
>
> CLIFF SOBCHUK
> Core RF Engineering
> Phone 613-667-1974 ecn: 8109-71974
> mobile 403-819-9233
> yahoo: sobchuk
> www.ericsson.com
>
> "The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"), who is
> solely responsible for this email and its contents. All inquiries regarding
> this email should be addressed to Ericsson. The web site for Ericsson is
> www.ericsson.com."
>
> This Communication is Confidential. We only send and receive email on the
> basis of the terms set out at www.ericsson.com/email_disclaimer
>
>
> -----Original Message-----
> From: Clifford Sobchuk
> Sent: Thursday, January 26, 2012 4:37 PM
> To: Clifford Sobchuk; Chris Marshall; Craig DeForest
> Cc: [email protected]
> Subject: RE: [Perldl] PDL::Graphics::Gnuplot on Win32 Vista.
>
> Ok I made some progress.
>
> As Craig (I think) pointed out that since I had minGW, 'make' would not be
> using dmake in the perl path. Using dmake and dmake install completed the
> PDL::Graphics::Gnuplot install.
>
> However, it still doesn't believe that gnuplot is in the path (although it
> is).
> ----------------CODE >>>---------------------------------
> pdl> use PDL::Graphics::Gnuplot
>
> pdl> $win=gpwin()
> Runtime error: PDL: Couldn't run the 'gnuplot' backend (is gnuplot in your
> path?) Caught at file (eval 434), line 5, pkg main -------------<<<
> CODE------------------------------------
>
> I can confirm that the method used to open gnuplot via open3 does in fact
> work.
>
> ----------------CODE >>>---------------------------------
> Module loaded and above command produces the following process tree:
> cmd 8488 8 1 34 43888 3216 2124
> perl 8008 8 1 54 101528 47232 42156
> -------------<<< CODE------------------------------------
>
> Then the following code.
> ----------------CODE >>>---------------------------------
> pdl> use IPC::Open3
>
> pdl> $pid = open3($in,$err,$err,"gnuplot", @gnuplot_options) if
> ($^O=~"MSWin32") || die "can't open handle"
>
> pdl> p $pid
> 9164
> -------------<<< CODE------------------------------------
>
> Results in :
> ----------------CODE >>>---------------------------------
> cmd 8488 8 1 34 43888 3216 2124
> perl 8008 8 1 58 101528 47248 42172
> gnuplot 9164 8 2 61 69240 8156 4900
> -------------<<< CODE------------------------------------
>
> So, why can't the module complete it?
>
> CLIFF SOBCHUK
> Core RF Engineering
> Phone 613-667-1974 ecn: 8109-71974
> mobile 403-819-9233
> yahoo: sobchuk
> www.ericsson.com
>
> "The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"), who is
> solely responsible for this email and its contents. All inquiries regarding
> this email should be addressed to Ericsson. The web site for Ericsson is
> www.ericsson.com."
>
> This Communication is Confidential. We only send and receive email on the
> basis of the terms set out at www.ericsson.com/email_disclaimer
>
>
> -----Original Message-----
> From: Clifford Sobchuk [mailto:[email protected]]
> Sent: Thursday, January 26, 2012 12:03 PM
> To: Chris Marshall; Craig DeForest
> Cc: [email protected]
> Subject: Re: [Perldl] PDL::Graphics::Gnuplot on Win32 Vista.
>
> On win32 the default terminal is 'wxt' and since they moved to wx for the
> display terminal it takes a long time to load a plot - on the order of 10-20
> seconds.
>
>
> CLIFF SOBCHUK
> Core RF Engineering
> Phone 613-667-1974 ecn: 8109-71974
> mobile 403-819-9233
> yahoo: sobchuk
> www.ericsson.com
>
> "The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"), who is
> solely responsible for this email and its contents. All inquiries regarding
> this email should be addressed to Ericsson. The web site for Ericsson is
> www.ericsson.com."
>
> This Communication is Confidential. We only send and receive email on the
> basis of the terms set out at www.ericsson.com/email_disclaimer
>
>
> -----Original Message-----
> From: Chris Marshall [mailto:[email protected]]
> Sent: Thursday, January 26, 2012 11:50 AM
> To: Craig DeForest
> Cc: Clifford Sobchuk; [email protected]
> Subject: Re: [Perldl] PDL::Graphics::Gnuplot on Win32 Vista.
>
> The basic command works on cygwin (which is what I would expect since it acts
> like unix). However, the same command fails on win32 with a message about
> not talking to the gnuplot for 5sec so that is where the IPC::Run (or is it
> open3) is a problem.
>
> Cheers,
> Chris
>
> On Thu, Jan 26, 2012 at 1:35 PM, Craig DeForest <[email protected]>
> wrote:
>> Hmmm, The "no curve option found that matches 'terminal' error sounds
>> like a basic problem with the test suite (which needs to be updated). For a
>> basic functionality test, try:
>>
>>
>> % perl -Mblib /usr/bin/perldl #(or whatever)
>> perl> use PDL::Graphics::Gnuplot;
>> perl> $w=gpwin();
>> perl> $w->plot(xvals(10),xvals(10)**2);
>>
>> which should generate no errors and a simple plot on your machine's default
>> device.
>>
>>
>>
>> On Jan 26, 2012, at 11:08 AM, Chris Marshall wrote:
>>
>>> I also get the same error on ASPerl 5.12.3 with Vista:
>>>
>>> F:\chm\pdl\git\PDL-Graphics-Gnuplot>dmake test
>>> C:\Users\chris.h.marshall\local\asperl\bin\perl.exe
>>> "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib',
>>> 'blib\arch')" t/*.
>>> t
>>> t/manifest.t .. skipped: Author tests not required for installation
>>> t/plot.t ...... 1/5 testfile: pdl_graphics_gnuplot_test_Vonlcev
>>> WARNING: Hmmm, gnuplot didn't respond for 5 seconds. I was
>>> expecting to read
>>> a version number. Ah, well, I'm returning the object anyway -- but
>>> don't
>>> be surprised if it doesn't work.
>>>
>>> # Failed test 'basic plotting succeeded without error'
>>> # at t/plot.t line 36.
>>> # plot() died with 'No curve option found that matches 'terminal'
>>> # '
>>>
>>> # Failed test 'basic plotting created a reasonably-sized file'
>>> # at t/plot.t line 43.
>>> # resulting output file should be ascii 79x24, but only contains 0
>>> bytes
>>>
>>> # Failed test 'error detection works'
>>> # at t/plot.t line 55.
>>> # plot() produced no error
>>> # Testing PDL::Graphics::Gnuplot 0.11ced, Perl 5.012003,
>>> C:\Users\CHRISH~1.MAR\local\asperl\bin\perl.exe
>>> # Looks like you failed 3 tests of 5.
>>> t/plot.t ...... Dubious, test returned 3 (wstat 768, 0x300) Failed
>>> 3/5 subtests
>>>
>>> Test Summary Report
>>> -------------------
>>> t/plot.t (Wstat: 768 Tests: 5 Failed: 3)
>>> Failed tests: 2, 4-5
>>> Non-zero exit status: 3
>>> Files=2, Tests=5, 2 wallclock secs ( 0.09 usr + 0.02 sys = 0.11
>>> CPU)
>>> Result: FAIL
>>> Failed 1/2 test programs. 3/5 subtests failed.
>>> dmake.exe: Error code 131, while making 'test_dynamic'
>>>
>>> On Thu, Jan 26, 2012 at 10:18 AM, Chris Marshall <[email protected]>
>>> wrote:
>>>> For what it is worth, IPC:Run 0.90 fails to pass all tests on
>>>> cygwin/Vista and the latest git clone from Craig's repo also fails
>>>> to pass tests. Maybe something is broken in the test suite?
>>>>
>>>> --Chris
>>>>
>>>> make test
>>>> PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e"
>>>> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/manifest.t ..
>>>> skipped: Author tests not required for installation t/plot.t ......
>>>> 1/5 testfile: pdl_graphics_gnuplot_test_8pt8eAN
>>>>
>>>> # Failed test 'basic plotting succeeded without error'
>>>> # at t/plot.t line 36.
>>>> # plot() died with 'No curve option found that matches 'terminal'
>>>> # '
>>>>
>>>> # Failed test 'basic plotting created a reasonably-sized file'
>>>> # at t/plot.t line 43.
>>>> # resulting output file should be ascii 79x24, but only contains 0
>>>> bytes
>>>>
>>>> # Failed test 'error detection works'
>>>> # at t/plot.t line 55.
>>>> # plot() produced no error
>>>> # Testing PDL::Graphics::Gnuplot 0.11ced, Perl 5.010001,
>>>> /usr/bin/perl # Looks like you failed 3 tests of 5.
>>>> t/plot.t ...... Failed 3/5 subtests
>>>>
>>>> Test Summary Report
>>>> -------------------
>>>> t/plot.t (Wstat: 0 Tests: 5 Failed: 3)
>>>> Failed tests: 2, 4-5
>>>> Files=2, Tests=5, 4 wallclock secs ( 0.03 usr 0.11 sys + 0.45
>>>> cusr
>>>> 1.05 csys = 1.65 CPU)
>>>> Result: FAIL
>>>> Failed 1/2 test programs. 3/5 subtests failed.
>>>> make: *** [test_dynamic] Error 255
>>>>
>>>>
>>>> On Thu, Jan 26, 2012 at 9:50 AM, Chris Marshall <[email protected]>
>>>> wrote:
>>>>> As far as PDL goes, the real problem is that the "talk to gnuplot"
>>>>> part doesn't work for win32---at least reliably. Once the module
>>>>> is working for unix, macosx, and windows it would be a candidate
>>>>> for migration into the PDL core distribution. Of course, there
>>>>> will need to be something like Alien::Gnuplot to handle installing
>>>>> the gnuplot dependency to support the module. I don't know if that
>>>>> is already done or not....
>>>>>
>>>>> --Chris
>>>>>
>>>>> On Thu, Jan 26, 2012 at 12:51 AM, Craig DeForest
>>>>> <[email protected]> wrote:
>>>>>> Thanks for having a look at this, Cliff.
>>>>>>
>>>>>> Both Dima and I left the default terminal to be the same as the built-in
>>>>>> Gnuplot default (that you get by not specifying one to gnuplot). On the
>>>>>> Mac, this defaults to "aqua"; on Fedora Linux it defaults to "X11cairo"
>>>>>> (IIRC).
>>>>>
>>>>> What is the default on win32? I know it isn't X11.
>>>>>
>>>>>
>>>>>> On Jan 25, 2012, at 10:27 PM, Clifford Sobchuk wrote:
>>>>>>
>>>>>>> From your response, I take it you are using cygwin and not strawberry
>>>>>>> or activestate perl. The IPC methods, I think I saw them in the .pm
>>>>>>> file near the bottom. I was trying to figure out exactly what was being
>>>>>>> called. I saw that gnuplot itself was being called which does work (not
>>>>>>> with pipes unless they changed it to be consistent with *nix platforms
>>>>>>> - previously it had to call pgnuplot for any piped actions), but I
>>>>>>> didn't see where the terminal type was set (the default that is, I
>>>>>>> expect we can put any terminal that is supported by gnuplot). I guess
>>>>>>> that during the tests files it would call the X11 term type? Does this
>>>>>>> mean that if I installed Xming that it would magically work - or at
>>>>>>> least pass the tests?
>>>>>>>
>>>>>>> I can give that a try and I'll check the differences between the IPC of
>>>>>>> the Graphics::GnuPlotIF and PDL:Graphics::Gnuplot to see if there is
>>>>>>> anything that I can naively spot as important.
>>>>>>>
>>>>>>> I tried to build the .tar.gz file from the git and it fails during make.
>>>>>>>
>>>>>>> drzowie-PDL-Graphics-Gnuplot-cbcb72d>perl Makefile.PL
>>>>>>> Set up gcc environment - 4.5.2
>>>>>>> Checking if your kit is complete...
>>>>>>> Warning: the following files are missing in your kit:
>>>>>>> debian/source
>>>>>>> Please inform the author.
>>>>>>> Writing Makefile for PDL::Graphics::Gnuplot Writing MYMETA.yml
>>>>>>> and MYMETA.json
>>>>>>>
>>>>>>> C:\Users\eclisob\Downloads\drzowie-PDL-Graphics-Gnuplot-cbcb72d\d
>>>>>>> rzowie-PDL-Graphics-Gnuplot-cbcb72d>make
>>>>>>> process_begin: CreateProcess(NULL, rem, ...) failed.
>>>>>>> make (e=2): The system cannot find the file specified.
>>>>>>> make: *** [blibdirs] Error 2
>>>>>>>
>>>>>>> Thanks,
>>>>>>> CLIFF SOBCHUK
>>>>>>> Core RF Engineering
>>>>>>> Phone 613-667-1974 ecn: 8109-71974 mobile 403-819-9233
>>>>>>> yahoo: sobchuk
>>>>>>> www.ericsson.com
>>>>>>>
>>>>>>> "The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"),
>>>>>>> who is solely responsible for this email and its contents. All
>>>>>>> inquiries regarding this email should be addressed to Ericsson. The web
>>>>>>> site for Ericsson is www.ericsson.com."
>>>>>>>
>>>>>>> This Communication is Confidential. We only send and receive
>>>>>>> email on the basis of the terms set out at
>>>>>>> www.ericsson.com/email_disclaimer
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Craig DeForest [mailto:[email protected]]
>>>>>>> Sent: Wednesday, January 25, 2012 9:15 PM
>>>>>>> To: Dima Kogan
>>>>>>> Cc: Craig DeForest; Clifford Sobchuk; [email protected]
>>>>>>> Subject: Re: [Perldl] PDL::Graphics::Gnuplot on Win32 Vista.
>>>>>>>
>>>>>>>
>>>>>>> On Jan 25, 2012, at 4:43 PM, Dima Kogan wrote:
>>>>>>>
>>>>>>>>> Clifford Sobchuk <[email protected]> wrote:
>>>>>>>>> I tried installing the PDL::Graphics::Gnuplot on top of 2.4.9
>>>>>>>>> and it resulted in the following report from cpanm. Any pointers?
>>>>>>>>
>>>>>>>> This just means that it couldn't run the gnuplot executable. I
>>>>>>>> haven't made any effort to make it work on Windows, so that's
>>>>>>>> why you are seeing the error. There shouldn't be a lot involved, but
>>>>>>>> somebody has to do it.
>>>>>>>>
>>>>>>>> Also it is important to note that the code on CPAN is my latest
>>>>>>>> branch. Craig has done lots of work on this module, and you should use
>>>>>>>> his latest:
>>>>>>>>
>>>>>>>> https://github.com/drzowie/PDL-Graphics-Gnuplot
>>>>>>>>
>>>>>>>> I don't know if Windows support was something he touched, but it's
>>>>>>>> worth a try.
>>>>>>>> Craig, care to weigh in?
>>>>>>>
>>>>>>> Sure. I've been working down the parse tree for Gnuplot. The existing
>>>>>>> module works great for a wide variety of simple things. There is crude
>>>>>>> FITS support. It is possible to do everything that gnuplot can do
>>>>>>> (which is quite a lot), but edgier cases still require messing with
>>>>>>> the syntax a bit (e.g. "xrange" works as advertised [you pass in a list
>>>>>>> ref containing <min>,<max>], unless you set "xmdate" to plot time
>>>>>>> values on the X axis, in which case you have to manually pass in a
>>>>>>> string that contains double quotes -- but that will be fixed).
>>>>>>>
>>>>>>> As for Windows support, I find that the "x11" device works fine with
>>>>>>> the only Windows system I use. Someone else who knows (or cares) how
>>>>>>> to support the cra^H^H^Hstuff that comes out of Redmond can hack the
>>>>>>> 2-3 methods that do the actual IPC to the gnuplot process.
>>>>>>>
>>>>>>> Here's an example plot I made recently for a paper. It shows fields of
>>>>>>> view of several instruments on the STEREO-A spacecraft and locations of
>>>>>>> several CMEs that were tracked at the end of 2008. It was surprisingly
>>>>>>> easy to generate (and is just one frame in a movie).
>>>>>>>
>>>>>>> I'd like to get one or two more rounds of smartening finished up and a
>>>>>>> better test suite written, but I (and I think Dima) am planning to have
>>>>>>> a CPAN release of PDL::Graphics::Gnuplot buttoned up in time for folks
>>>>>>> to poke and prod it before 2.4.11 comes out (hopefully ~4-6 months
>>>>>>> after 2.4.10).
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Craig
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl