Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否有人在Windows上使用草莓Perl 5.30.1.1的PDL版本使用PDL创建绘图?_Windows_Perl_Pdl - Fatal编程技术网

是否有人在Windows上使用草莓Perl 5.30.1.1的PDL版本使用PDL创建绘图?

是否有人在Windows上使用草莓Perl 5.30.1.1的PDL版本使用PDL创建绘图?,windows,perl,pdl,Windows,Perl,Pdl,是否有人在Windows上使用草莓Perl的PDL版本使用PDL(Perl数据语言)创建绘图 我从Windows 10上安装了草莓Perl 5.30.1.1的PDL版本(64位),启动了PDL(pdl2),并尝试显示PDL手册(2015版)第一个示例中描述的绘图: 但是得到 Trying gnuplot (PDL::Graphics::Gnuplot)...nope Trying pgplot (PDL::Graphics::PGPLOT::Window)...nope Trying plplo

是否有人在Windows上使用草莓Perl的PDL版本使用PDL(Perl数据语言)创建绘图

我从Windows 10上安装了草莓Perl 5.30.1.1的PDL版本(64位),启动了PDL(pdl2),并尝试显示PDL手册(2015版)第一个示例中描述的绘图:

但是得到

Trying gnuplot (PDL::Graphics::Gnuplot)...nope
Trying pgplot (PDL::Graphics::PGPLOT::Window)...nope
Trying plplot (PDL::Graphics::PLplot)...nope
Trying prima (PDL::Graphics::Prima)...nope
Runtime error: Sorry, all known plotting engines failed.  Install one and try again.
即使gnuplot 5.2 patchlevel 6包含在该版本的草莓Perl中

我发现PDL没有检测到gnuplot,因为Alien::gnuplot v1.033中存在问题。如果我将Alien::Gnuplot::load_Gnuplot的Windows特定部分更改为

if($^O =~ /MSWin32/i) {

  if( $exec_path =~ m/([\"\*\?\<\>\|])/ ) {
    die "Alien::Gnuplot: Invalid character '$1' in path to gnuplot -- I give up" ;
  }

  use Win32::Job;
  my $job = Win32::Job->new;
  open my $ofh, ">$file";
  if (defined $ofh) {
    my $pid = $job->spawn(undef, qq{"$exec_path" ${file}_gzinta},
                          { no_window => 1, stdout => $ofh, stderr => $ofh });
    if (defined $pid) {
      $job->run(3); # wait at most 3 seconds for job to finish
    }
  }
}
因此,检测到gnuplot,但显然无法满足某些附加要求

因此,Windows上草莓Perl 5.30.1.1的PDL版附带的gnuplot版本似乎不适合PDL使用,即使Alien::gnuplot问题已得到修复——但随机用户(me)第一个注意到这一点似乎有些奇怪。还是我做错了什么

我在上报告了这个明显的错误,但我对其他用户在Windows上使用这个版本的体验感兴趣

编辑2020-01-10:说草莓Perl的PDL版是在Windows上安装PDL的“绝对最简单的方法”,并且没有提到其他需要安装的东西

它还提到了一种“简单的替代方法”,包括显式安装PGPLOT,这是PDL尝试使用的其他图形引擎之一

这意味着“绝对最简单的方法”不需要额外的工作来安装图形引擎,但我的经验不同


我的问题不是“为了使我的PDL能够使用图形引擎,我还需要安装什么其他东西?”。我想知道它是否能像“绝对最简单的方法”所暗示的那样开箱即用。

消息中指出,但您的不支持x11或wxt终端——gnuplot需要x11环境或wxt终端。您的选项是或。@PolarBear:gnuplot在Windows上不需要x11或wxt终端。它的“Windows”终端工作正常。但显然,PDL只知道如何使用x11或wxt终端。那么,如果PDL不能在Windows上使用gnuplot,为什么要将gnuplot和PDL打包在一起(在Windows的草莓Perl PDL版本中)?
if($^O =~ /MSWin32/i) {

  if( $exec_path =~ m/([\"\*\?\<\>\|])/ ) {
    die "Alien::Gnuplot: Invalid character '$1' in path to gnuplot -- I give up" ;
  }

  use Win32::Job;
  my $job = Win32::Job->new;
  open my $ofh, ">$file";
  if (defined $ofh) {
    my $pid = $job->spawn(undef, qq{"$exec_path" ${file}_gzinta},
                          { no_window => 1, stdout => $ofh, stderr => $ofh });
    if (defined $pid) {
      $job->run(3); # wait at most 3 seconds for job to finish
    }
  }
}
Trying gnuplot (PDL::Graphics::Gnuplot)...PDL::Graphics::SImple: Gnuplot exists but yours doesn't support either the x11 or wxt terminal
Trying pgplot (PDL::Graphics::PGPLOT::Window)...nope
Trying plplot (PDL::Graphics::PLplot)...nope
Trying prima (PDL::Graphics::Prima)...nope
Runtime error: Sorry, all known plotting engines failed.  Install one and try again.