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上安装了命令行工具,以便我拥有gcc并make在/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
小智 11
在MacOS上使用gnuplot的最佳方法是将其设置为与aquaterm一起使用而不是X11.以下是我在Yosemite和El Capitan MacOS上所做的事情:
Brew uninstall gnuplot brew uninstall aquaterm.bottomline:你不应该在你的系统上安装任何gnuplot或aquaterm.
brew install Caskroom/cask/aquatermbrew install gnuplot --with-aquaterm --with-qt4ln -s /usr/local/Cellar/gnuplot/5.0.4/bin/gnuplot /usr/local/bin/gnuplot就这些; 请注意,如果brew安装了不同版本的gnuplot,gnuplot的位置可能会有所不同.
现在,如果你gnuplot在终端中运行,你应该看到这样的东西:
命令的输出gnuplot
感谢 @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”和“缓慢字体初始化”的警告消息消失了!
| 归档时间: |
|
| 查看次数: |
67220 次 |
| 最近记录: |