Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set defalult plot linewidth in .octaverc

Tags:

plot

octave

I am starting out with Octave. I am using Octave 4.2.0 (compiled from source) on Debian.

I have found that using the qt or fltk graphics_toolkit, have default linewidth of 0.5. I want to change the default linewidth in my .octaverc file.

I have tried adding the following to my .octaverc (separately) but they both cause errors

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

How can I change the default line width of plots via the octaverc file?

like image 582
Xero Smith Avatar asked Mar 27 '26 00:03

Xero Smith


1 Answers

It sounds like you want to set it on the root so that all plots will use it:

set(0, "defaultlinelinewidth", 1.5);

Here is the link to the relevant part of the manual.

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.

EDIT:

Just to place emphasis on this: You've tried to set "defaultlinewidth" which is not a valid property as explained above. The property you want to set is "defaultlinelinewidth"

like image 120
Andy Avatar answered Mar 31 '26 09:03

Andy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!