在OSX上安装gnuplot 5.0.1

dad*_*ada 30 macos gnuplot command-line-tool

我从source forge 页面下载了gnuplot 5.0.1(gnuplot-5.0.1.tar.gz)的源文件.我还在我的OS X 10.7.5上安装了命令行工具,以便我拥有gccmake/usr/bin文件夹中.

我遵循的安装说明INSTALL.gnu的压缩包文件:我跑的configure文件和类型make,make check,make install,和make clean.使用这些命令,gnuplot位于/usr/local/bin/.

make check在测试许多gnuplot脚本之前,该命令会在shell中输出很多行.我实际上可以想象这些情节,我认为"很好,它有效".所以我打开了一个新的终端shell并键入gnuplot以开始使用它(终端自动设置为qt).一个简单的plot sin(x)失败.Gnuplot返回以下消息:

Could not start gnuplot_qt with path "/usr/local/libexec/gnuplot/5.0/gnuplot_qt" 
Could not start gnuplot_qt with path "/usr/local/libexec/gnuplot/5.0/gnuplot_qt" 
Could not connect to gnuplot_qt "" . Starting a new one 
Could not start gnuplot_qt with path "/usr/local/libexec/gnuplot/5.0/gnuplot_qt" 

Warning: slow font initialization  .  .  .  .  .  .  .  .  .
Warning: slow font initialization  .  .  .  .  .  .  .  .  .
Warning: slow font initialization  .  .  .  .  .  .  .  .  .
Warning: slow font initialization  .  .  .  .  .  .  .  .  .

… 
Run Code Online (Sandbox Code Playgroud)

如果我不关闭终端,警告信息会无限地出现.

iru*_*aia 57

为了尽量减少我的工作量,我倾向于使用包管理器尽可能多地安装命令行工具.

OS XI推荐使用自制软件.使用自制软件安装gnuplot就像输入一样简单: brew install gnuplot

  • 最后,我卸载了gnuplot并通过指定x11终端再次安装:`brew uninstall gnuplot && brew install gnuplot --with-x11`.这样,打开gnuplot会自动将终端设置为x11. (10认同)
  • @dada,您的评论非常有助于实现这一目标.幸运的是我看到了!再次感谢. (4认同)
  • 如何知道此命令将安装哪个版本的gnuplot? (2认同)

小智 11

在MacOS上使用gnuplot的最佳方法是将其设置为与aquaterm一起使用而不是X11.以下是我在Yosemite和El Capitan MacOS上所做的事情:

  1. 首先删除gnuplot和aquaterm的所有预安装,如果有的话:
    • Brew uninstall gnuplot
    • 如果您之前通过应用程序中的dmg文件安装了Aquaterm,请手动删除它.
    • 如果您使用brew安装Aquaterm,请使用brew uninstall aquaterm.

bottomline:你不应该在你的系统上安装任何gnuplot或aquaterm.

  1. 现在使用brew命令安装aqua术语:
    • brew install Caskroom/cask/aquaterm
  2. 然后使用follwing命令安装gnuplot:
    • brew install gnuplot --with-aquaterm --with-qt4
  3. 最后,运行以下命令在路径中创建gnuplot的快捷方式
    • ln -s /usr/local/Cellar/gnuplot/5.0.4/bin/gnuplot /usr/local/bin/gnuplot

就这些; 请注意,如果brew安装了不同版本的gnuplot,gnuplot的位置可能会有所不同.

现在,如果你gnuplot在终端中运行,你应该看到这样的东西: 命令的输出gnuplot

  • QT4不再支持.现在只使用QT.:brew install gnuplot --with-aquaterm --with-qt` (6认同)

dad*_*ada 5

感谢 @irundaia 的回答加上一些 Google 搜索,我终于让 gnuplot 与我最喜欢的 x11 终端一起工作。这是工作流程:在终端类型中:

brew uninstall gnuplot
brew install gnuplot --with-x11
Run Code Online (Sandbox Code Playgroud)

第一个命令卸载以前随自制软件安装的 gnuplot。第二个命令通过指定 x11 终端来安装 gnuplot 。这样,打开 gnuplot 将终端自动设置为 x11,并且有关“gnuplot_qt”和“缓慢字体初始化”的警告消息消失了