[Tex/LaTex] label font size in matlab->matlab2tikz

fontsizeMATLABmatlab2tikzpgfplots

Does anyone knoy how can we increase the labels fontsize when we use the matlab2tikz (see this link) function from the mathworks file exchange? I always have to access the *.tikz generated file and then add an insctruction to increase the font. Can't that be done as an input to the mat2tikz function?

UPDATE: Using the suggested solution by Torbjørn T, the function matlab2tikz does modify the labels fontsize, however, since I am using nested functions in the following manner (to generate the PDF version):

plotviatikztopdf(strcat(filename,'PPT','.tikz'),'standalone', true,'extraAxisOptions','label style={font=\Large}')
    function plotviatikztopdf(filename,varargin)

matlab2tikz(filename,varargin)


%%
ind = find(filename=='.',1,'last');
basename = filename(1:ind-1);
if ispc
    command = sprintf(' pdflatex -jobname %s \\documentclass{standalone}\\usepackage{pgfplots,amsmath}\\begin{document}\\input{%s}\\end{document}',basename,filename);
elseif isunix
    command = sprintf(' pdflatex -jobname %s \\\\documentclass{standalone}\\\\usepackage{pgfplots,amsmath}\\\\begin{document}\\\\input{%s}\\\\end{document}',basename,filename);
end

system(command);

if ispc
    system(sprintf('del "%s.aux"',basename));
    system(sprintf('del "%s.log"',basename));

    %%moving to required directory
elseif isunix
    system(sprintf('rm %s.aux %s.log',basename,basename));
end

sozrce of the above function Link
The output is ignoring the 'ExtraAxisOptions' . Is there something wrong in my varargin?

Thanks.

Best Answer

When I first wrote that function I thought I had tested with optional arguments as well, but it seems it doesn't work after all. To fix that change the first line of plotviatikztopdf to

matlab2tikz(filename,varargin{:})

i.e. just add {:} at the end of varargin.

To use 'standalone',true the preamble and document environment has to be removed from the command string, so change that to sprintf('pdflatex %s',filename) (untested).

(I'll update my other answer later.)