Lo script matlab2tikz purtroppo ha qualche limite che voglio segnalare:
– se nel grafico vengono inserite label oltre alla legenda queste non vengono convertite in tikz;
– la conversione di grafici 3D non avviene.
Premetto che lo uso da pochi giorni quindi non ho ancora un’ ottima dimestichezza.
`% ========================================================================
% *** FUNCTION matlab2tikz
% ***
% *** Convert figures to TikZ (using pgfplots) for inclusion in LaTeX
% *** documents.
% ***
% *** Workflow:
% *** 0.) Place this file in one of the MATLAB paths
% ** (for example the current directory).
% *** 1.) Create your 2D plot in MATLAB.
% *** 2.) Invoke matlab2tikz by
% ***
% *** >> matlab2tikz( 'test.tikz' );
% ***
% ***
% *** ——-
% *** Note:
% *** ——-
% *** This program is a rewrite on Paul Wagenaars' Matfig2PGF which
% *** itself uses pure PGF as output format
% ***
% *** http://www.mathworks.com/matlabcentral/fileexchange/12962
% ***
% *** In an attempt to simplify and extend things, the idea for
% *** matlab2tikz has emerged. The goal is to provide the user with a
% *** clean interface between the very handy figure creation in MATLAB
% *** and the powerful means that TikZ with pgfplots has to offer.
% ***
% ***
% *** TODO: * tex(t) annotations
% *** * 3D plots
% ***
% =========================================================================`
Per grafici 3D (superfici) cerca surf2latex