in reply to Re^2: Missing sub-module of PDL::Graphics::Simple
in thread Missing sub-module of PDL::Graphics::Simple

Insights, insights, insights :-) I don't know if there is an easy fix for this but I discovered that in my perlbrewed perl 5.36.1 there is a gnuplot binary, Version 5.4 patchlevel 6 last modified 2023-02-09, whereas mine built and installed in /opt/local with macPorts is Version 5.4 patchlevel 8 last modified 2023-06-01. The versions themselves are not important, but what is, is that 'unknown' terminal type is coming from the perlbrew version, as in:

  Terminal type is now 'unknown'

  set term x11
         ^
  unknown or ambiguous terminal type; type just 'set terminal' for a list

  WARNING: Error during initialization

The PDL::Graphics::Gnuplot build Make is not using my macPorts gnuplot but this one in perlbrew that may be crippled. Also, this perlbrewed version is not honoring GNUTERM='x11' in zsh. Simply relying on $PATH won't work as 'which gnuplot' already returns the one in /opt/local while the Make in PDL::Graphics::Gnuplot is not. It looks like fetching and building Alien::Gnuplot with cpanm is the source of that gnuplot binary in perlbrew. I'm not sure what the best fix is, to delete all traces of gnuplot in perlbrew or to explore its config. It strikes me as the better solution is to use the macPorts version which probably contains a full implementation of gnuplot. Comments please?

  • Comment on Re^3: Missing sub-module of PDL::Graphics::Simple

Replies are listed 'Best First'.
Re^4: Missing sub-module of PDL::Graphics::Simple
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 20:07 UTC

    My bad :-( I did an rtfm on the docs in Alien::Gnuplot and discovered two environment variables that can and should be set in zsh, to wit:

    
      GNUPLOT_BINARY=/opt/local/bin/gnuplot
      GNUPLOT_INTERACTIVE=1   # to enable interactive tests
      GNUTERM=x11
    
    
    

    I then ran 'make test' in the Alien::Gnuplot build directory and got these results:

    Click in the X11 window for mouse test. t/plot.t ............. 135/? lot to continue... # Failed test 'Mouse test read a click' # at t/plot.t line 638. # got: 'read_mouse: string Key: 1 at xy: 1.440036900369 , 8.8 +0252100840336 shift: 0 alt: 0 ctrl: 0 doesn't look right - doesn't ma +tch parse regexp. # at /Users/wills/.cpanm/work/1691895761.64888/PDL-Graphics-Gnuplot-2 +.024/blib/lib/PDL/Graphics/Gnuplot.pm line 4481, <STDIN> line 15. # PDL::Graphics::Gnuplot::read_mouse(PDL::Graphics::Gnuplot=HASH(0 +x7fe90334bc58)) called at t/plot.t line 637 # eval {...} called at t/plot.t line 637 # ' # expected: '' t/plot.t ............. 137/? Gnuplot warning: empty y range [0:0], adj +usting to [-1:1] at t/plot.t line 819. INFO: Plotting to 'Plot-1.txt' at t/plot.t line 911. INFO: Plotting to 'Plot-2.txt' at t/plot.t line 914. # Looks like you failed 1 test of 192. t/plot.t ............. Failed 1/192 subtests (less 4 skipped subtests: 187 okay) Test Summary Report ------------------- t/plot.t (Wstat: 0 Tests: 192 Failed: 1) Failed test: 135 Files=3, Tests=197, 123 wallclock secs ( 0.05 usr 0.01 sys + 8.36 cu +sr 2.67 csys = 11.09 CPU) Result: FAIL Failed 1/3 test programs. 1/197 subtests failed. make: *** [test_dynamic] Error 22

    Not sure what the issue is with my mouse, a Logitech 2-button USB wireless with a scroll wheel. I think it is probably safe to install this module. And finally, running that sin.pl script I referenced in my original post does execute an XQuartz plot with only this harmless warning:

    Trying gnuplot (PDL::Graphics::Gnuplot)...ok Use of uninitialized value in string eq at /Users/wills/perl5/perlbrew +/perls/perl-5.36.1/lib/site_perl/5.36.1/PDL/Graphics/Gnuplot.pm line +7494.