plot - 在 MacOS 上,如何在 Octave 5.1 上包含来自 octave-cli 的 Octave 图形工具包?
问题描述
在 MacOS 下(Sierra 10.13.6,如果重要的话),我开发了一些 Octave 脚本,它们在 Octave-gui 下运行良好,但不能从 octave-cli 运行。它们包括用于绘制结果的图形;当从 cli 启动 Octave 时,如何包含所需的图形工具包?
我尝试了其他提示和技巧,包括增强路径和向 octave-cli 添加别名,这使得从脚本启动 octave-cli 变得更简单,但仍然得到:
GNU Octave, version 5.1.0
Copyright (C) 2019 John W. Eaton and others.
...
octave:1> gt_7tCurrieLiFe1
Time to read the dataset: 0.48 sec
Time to parse the dataset: 0.0013 sec
Time for loop over the dataset: 18.47 sec
error: no graphics toolkits are available!
error: called from
figure at line 91 column 7
gt_7tCurrieLiFe1 at line 61 column 1
...
[line 61 of gt_7tCurrieLiFe1.m]
plot(1:endcount, gt_data(:,3), "linestyle", "-", ...
1:endcount, gt_data(:,4), "linestyle", "--")
...
我所期望的是,当从 Octave GUI 运行相同的脚本时,绘图窗口会打开。
感谢您提供任何提示以进一步完成此任务。
解决方案
推荐阅读
- sql - 嵌套 IF 存储过程中的局部变量
- java - Android google drive v3 api 文件不是创建/存储特定于应用程序的文件夹,而是它在我的驱动器部分中使用“Untitile”文件名创建
- teamcity - 如果我在 TeamCity 构建中“启动”一个进程,它会在构建完成时被删除吗?
- bootstrap-4 - 如何设置 Bootstrap,以便我的 Vue 应用程序可以使用正确的版本,具体取决于语言设置?
- java - 在java中使用命令行运行python
- php - 是否可以结合mysql和mongodb数据库进行排序
- javascript - 滑块过渡有误
- css - “a”元素上的悬停效果不起作用但适用于按钮(同一页面)
- python - 在Python中查找椭圆的最小和最大角度
- python - 绘制所有样本的混淆矩阵