in reply to Re: Missing sub-module of PDL::Graphics::Simple
in thread Missing sub-module of PDL::Graphics::Simple
I will cross-post on the PDL bug tracker, but here is a bit more information. My last thought in my post was to edit the list of external plot mechanisms in Simple.pm, but neither shuffling the order or even removing all but Gnuplot fail to resolve the issue. So, I tried cpanm PDL::Graphics::Gnuplot, because gnuplot is alive and well on my system. I can plot to XQuartz from stand-alone gnuplot with either terminal set default to 'aqua' (macOS default) or with GNUTERM='x11' set in my zsh environment. However, therein is another issue that may be either related or a second bug with PDL itself. The build log for PDL::Graphics::Gnuplot contains:
# Failed test at t/plot.t line 16. # got: 'PDL::Graphics::Gnuplot: Your gnuplot has terminal 'un +known' but it is not supported. # unknown: Unknown term (gnuplot final default) [NS: not a t +erminal] # # You can use the 'terminfo' method for a list of available terminals. # # at /Users/wills/.cpanm/work/1691895761.64888/PDL-Graphics-Gnuplot-2 +.024/blib/lib/PDL/Graphics/Gnuplot.pm line 2333. # PDL::Graphics::Gnuplot::output(undef) called at /Users/wills/. +cpanm/work/1691895761.64888/PDL-Graphics-Gnuplot-2.024/blib/lib/PDL/G +raphics/Gnuplot.pm line 2174 # PDL::Graphics::Gnuplot::new("PDL::Graphics::Gnuplot") called a +t /Users/wills/.cpanm/work/1691895761.64888/PDL-Graphics-Gnuplot-2.02 +4/blib/lib/PDL/Graphics/Gnuplot.pm line 2091 # PDL::Graphics::Gnuplot::gpwin() called at t/plot.t line 14 # eval {...} called at t/plot.t line 14 # ' # expected: '' # Failed test ''Constructor created a plotting object' isa 'PDL::Gra +phics::Gnuplot'' # at t/plot.t line 17. # 'Constructor created a plotting object' isn't defined
I can find no way to configure the build environment in PDL::Graphics::Gnuplot to set the terminal type, and the build environment does not recognize the environment variable GNUTERM set to 'x11', even though gnuplot does. There is code in the POD for Gnuplot.pm such as
my $win = gpwin('x11');that shows how to set gnuplot terminal from inside a PDL script but no explanation of how to configure the interface to gnuplot to get the module to build and pass its tests. Also, quoting from the POD, to wit:
gpwin is the PDL::Graphics::Gnuplot exported constructor. It is exported by default and is a synonym for "new PDL::Graphics::Gnuplot(...)". If given no arguments, it creates a plot object with the default terminal settings for your gnuplot. You can also give it the name of a Gnuplot terminal type (e.g. 'x11') and some terminal and output options (see "output").
If I can set GNUTERM='x11' in zsh, and gnuplot recognizes it as its default, why doesn't the Makefile recognize it? Another intreresting observation in the POD is that PDL uses Alien::Gnuplot to discover whether gnuplot is installed and working correctly. If it isn't Alien::Gnuplot will barf and terminate. Mine doesn't but PD::Graphics::Gnuplot will still not build. I know interfacing PDL with an external plotting engine such as gnuplot is not trivial, but neither is getting it to build. As I said, I will cross-post, but getting an answer from the PDL dev group can take a very long time. Any advice from Monks would be very welcome.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Missing sub-module of PDL::Graphics::Simple
by NERDVANA (Priest) on Aug 15, 2023 at 01:11 UTC | |
by perlboy_emeritus (Scribe) on Aug 15, 2023 at 13:46 UTC | |
Re^3: Missing sub-module of PDL::Graphics::Simple
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 18:03 UTC | |
by perlboy_emeritus (Scribe) on Aug 13, 2023 at 20:07 UTC |