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.
\pgfplotsset{label style={font=\Large}}
to the preamble of your.tex
file help?.tikz
file, but to the.tex
file where you\input
the.tikz
. Then you only have to add it once, and if you want to change it, you only have to change it one place.'standalone'
option, I assume you're using that. You could try adding thelabel style
to'extraAxisOptions'
, i.e.'extraAxisOptions','label style={font=\Large}'
.