Issues with Octave font and size changes

I would like to help with the problem that I am experiencing in Octave 3.6.4 on Ubuntu 13.04.

I looked at several ways to change the font size and / or font of a legend, title or plot axis; and I found that the code I find is not working. I tried to copy several pieces of code designed to resize text or font, and I could not change them.

The font that Octave displays when plotting is a regular, fixed-width font.

Can anyone help me? I tried things like ...

xlabel('x-title', 'FontSize', 20) 

or

 xlabel('x-title', 'FontName', 'Vera') 

or

 foo = xlabel('x-title') set(foo, 'FontSize', 20) 

or

 foo = xlabel('x-title) set(foo, 'FontName', 'Vera') 

And not one changes the font.

+4
source share
1 answer

I have the same problem with Octave 3.6.4 and Ubuntu 12.04. If you don't care how the shape looks in Octave, but what it looks like when the file is output, then this should work:

 plot(1:10); xlabel("example");ylabel("example");title("example"); fontsize=20; set([gca; findall(gca, 'Type','text')], 'FontSize', fontsize); set([gca; findall(gca, 'Type','line')], 'linewidth', 3); hx=legend('example');set(hx, "fontsize", fontsize) saveas(1, "presentation.jpg"); 
+2
source

Source: https://habr.com/ru/post/1500629/


All Articles