How to change axis linewidth and fontsize in Octave
Asked Answered
W

1

31

I am trying to resize some plots in Octave. I've been able to change the line thickness and axis labels. However, I cannot find a way to make the axes themselves thicker, or the numbers larger.

What I've found online uses set(), like

plot(x, y, "linewidth",5);
h=get(gcf, "currentaxes");
set(h, "fontsize", 12, "linewidth", 2);

or

set(gca, 'linewidth', 4);

But, I am continuing to see the errors

invalid property 'linewidth'
invalid property 'fontsize'

even though they are listed as properties in the Octave documentation

What am I doing wrong?

Or, what else can I try?

Werbel answered 23/10, 2014 at 18:0 Comment(0)
F
35

With octave 3.8.2 it is working fine.

x=1:10;
plot(x, x, "linewidth", 5)
set(gca, "linewidth", 4, "fontsize", 12)

yields working linewidth

as it should

Fitting answered 23/10, 2014 at 18:47 Comment(3)
I have octave 3.0.5. Could an outdated version be the issue?Werbel
@Werbel probably. Your link to the documentation is to the latest Octave version but you are using a very much old version. Check on the documentation of the version you have installed for the correct option names (the Octave manual is part of an Octave installation).Husband
It should be added that using linewidth in the plot() function sets that line width, whereas if you use it in the set(gca,...), you will set all lines, like border etc.Pitts

© 2022 - 2024 — McMap. All rights reserved.