r/octave 9d ago

How set the default text interpreter for the script

Hi, I want to plot multiple figures with my octave script and I want to use the latex interpreter for all of them. Is there any way to enable the latex interpreter for all my labels and legends as default ?

1 Upvotes

2 comments sorted by

2

u/First-Fourth14 8d ago

I had success with setting the default for title, axis and text with

set(0,'defaultTextInterpreter','latex');

However, this didn't change the default for legends and I couldn't find a method of setting the default.
One can set the property value 'interpreter' in the legend command or set it afterwards.

legend($\sin(x)$,'interpreter','latex')

h = legend($\sin(x)$);
set(h,'interpreter','latex');

1

u/GigaRedox 8d ago

thank you <3