Files
imdd_silas/Functions/mat2tikz_improved.m
2026-06-03 09:05:33 +02:00

41 lines
1.9 KiB
Matlab

function mat2tikz_improved(filename,options)
arguments
% Default to the path in your example if no argument is provided
filename (1,1) string = 'C:\Users\Silas\Documents\Dissertation\00_Examples\tikz\textfig.tikz';
options.cleanfigure = false;
end
if options.cleanfigure
cleanfigure;
end
matlab2tikz(char(filename), ...
'width', '\fwidth', ...
'height', '\fheight', ...
'showInfo', false, ...
'extraAxisOptions', { ...
'xlabel style={font=\color{white!15!black}\small}', ...
'ylabel style={font=\color{white!15!black}\small}', ...
'scaled ticks=false', ...
'tick label style={/pgf/number format/fixed, /pgf/number format/1000 sep={}}', ...
'every axis/.append style={font=\scriptsize}', ...
'legend columns=1', ...
'legend style={at={(0.02,0.98)}, anchor=north west, font=\scriptsize, draw=black!100, rounded corners=2pt, inner sep=1pt, fill=white, column sep=2pt}' ...
});
% matlab2tikz(char(filename), ...
% 'width','\fwidth', ...
% 'height','\fheight', ...
% 'showInfo',false, ...
% 'extraAxisOptions',{ ...
% 'legend style={font=\footnotesize}', ...
% 'xlabel style={font=\color{white!15!black},font=\small},',...
% 'ylabel style={font=\color{white!15!black},font=\small},',...
% 'legend columns=1', ...
% 'every axis/.append style={font=\scriptsize}',...
% 'legend columns=1',...
% 'legend style={at={(0.02,0.98)},font=\footnotesize,draw=black!60,rounded corners=2pt,inner sep=1pt,fill=white,column sep=6pt,anchor= north west}',...
% 'legend style={at={(0.02,0.98)},draw=white!0!white,font=\scriptsize,inner sep=0.1pt,fill=white,column sep=1pt,anchor= north west}',...
% 'every axis/.append style={font=\scriptsize}',...
% 'scaled ticks=false', ...
% 'tick label style={/pgf/number format/fixed, /pgf/number format/1000 sep={}}' ...
% });
end