如何使Octave默认使用“gnuplot”而不是“fltk”?

19

我在Ubuntu 13.10上使用Octave 3.8,但"fltk"图形库无法正常工作。因此,我总是使用以下命令切换到"gnuplot":

graphics_toolkit("gnuplot")

如何配置Octave默认使用“gnuplot”?

2个回答

21

9
你可以将这行添加到 .octaverc 文件中。如果该文件不存在,请在你的主目录下创建它。该文件会在每次启动 Octave 时执行,除非你传递 -f--norc 选项。
你可以在 .octaverc 文件中添加许多其他内容。作为示例,以下是我的一部分内容:
## use man instead of help
function man (name = "help");
  mlock (); # lock in memory so it's not removed by clear all
  help (char (name));
endfunction

## no octave-core
crash_dumps_octave_core (0);

EDITOR ("nano");
edit ("mode", "sync");

## pretty prompt
PS1 ("\\[\\033[01;31m\\]\\s:\\#> \\[\\033[0m\\]");
## no > for multi-line input
PS2 ("");

## default image size to take the right half of the monitor
set (0,
  "DefaultFigurePosition",
    [get(0, "screensize")(3)/2    1 ...
     get(0, "screensize")(3)/2    get(0, "screensize")(4)]
);

1
那个针对显示器右半部分的图像的技巧很不错。 - juliohm

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接