在 .octaverc 中设置默认绘图线宽

Set defalult plot linewidth in .octaverc

我开始使用 Octave。我在 Debian 上使用 Octave 4.2.0(从源代码编译)。

我发现使用 qt 或 fltk graphics_toolkit,默认线宽为 0.5。我想更改 .octaverc 文件中的默认线宽。

我尝试将以下内容添加到我的 .octaverc(单独),但它们都会导致错误

linewidth:def.1.5000
set(gca (), "defaultlinewidth", "1.5")

如何通过 octaverc 文件更改绘图的默认线宽?

听起来你想把它设置在根上,这样所有的地块都会使用它:

set(0, "defaultlinelinewidth", 1.5);

Here is the link 到手册的相关部分。

15.3.5 Managing Default Properties

Object properties have two classes of default values, factory defaults (the initial values) and user-defined defaults, which may override the factory defaults.

Although default values may be set for any object, they are set in parent objects and apply to child objects, of the specified object type. For example, setting the default color property of line objects to "green", for the root object, will result in all line objects inheriting the color "green" as the default value.

set (0, "defaultlinecolor", "green");

sets the default line color for all objects. The rule for constructing the property name to set a default value is

default + object-type + property-name

This rule can lead to some strange looking names, for example defaultlinelinewidth" specifies the default linewidth property for line objects.

编辑:

只是强调一下:您已尝试将 "defaultlinewidth" 设置为 而不是 一个有效的 属性,如上所述。你要设置的属性是"defaultlinelinewidth"