MATLAB: A function to set common properties for all open figures

figures

Hi,
As said in the title, I want to creat a function that imposes the same setting for all open figures. By far, I managed to do:
function SetFigureDefaults
set(findall(gcf,'-property','FontSize'),'FontSize',18)
set(findall(gcf,'-property','LineWidth'),'LineWidth',2)
end
And that works. However, I am struggling with everything related with the text interpreter. I was repeating the following lines for each figure
colorbar('TickLabelInterpreter', 'latex')
set(groot,'defaulttextinterpreter','latex');
set(groot, 'defaultLegendInterpreter','latex');
Now, I want to use them with findall feature. I want that ALL axis ticks and ALL colorbar annotations (ticks and labels) become of latex form. How shall I do that ?
Thanks for your help,
Mary

Best Answer

h = findall(0, '-property', 'TickLabelInterpreter');
set(h, 'TickLabelInterpreter', 'Latex')