Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change axis linewidth and fontsize in Octave

Tags:

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?

like image 483
qstnhr Avatar asked Oct 23 '14 18:10

qstnhr


People also ask

How do you change the font size on an axis label?

To change the text font for any chart element, such as a title or axis, right–click the element, and then click Font. When the Font box appears make the changes you want.

How do you change the font size of axis labels in Matlab?

To change the font units, use the FontUnits property. Setting the font size properties for the associated axes also affects the label font size. The label font size updates to equal the axes font size times the label scale factor. The FontSize property of the axes contains the axes font size.

How do I change font size in Matlab?

On the Home tab, in the Environment section, click Preferences. Select MATLAB > Fonts and, in the Desktop code font section, select a font size. Specify the font size using font preferences.


1 Answers

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

like image 141
ederag Avatar answered Nov 17 '22 05:11

ederag