I am trying to include multiple 3D figures (created in matlab) into a latex file.
The original 3D figures in matlab look like this:
In the .m file that creates these figures, I use
ylabel('transformed W_t/D_t','VerticalAlignment','bottom') xlabel('\lambda_t','VerticalAlignment','bottom')
to move the xlabel and ylabel up.
Then I use
matlab2tikz('figure2a_2.tikz', 'height', '\figureheight', 'width', '\figurewidth','extraAxisOptions','zticklabel style={/pgf/number format/fixed}')
to convert the file to a .tikz file.
In Latex, I run
\documentclass[11pt]{article}\usepackage{pgfplots, pgfplotstable}\begin{document}\begin{figure}[!htb]\centering \newlength\figureheight \newlength\figurewidth \setlength\figureheight{5cm} \setlength\figurewidth{6cm} \input{Figure2a_2.tikz} \caption{{\bf Structure of model: capital can be invested in a bank sector and an equity sector.} An intermediary has the expertise to reallocate capital between the sectors and to monitor bank capital against bank crashes.}\label{fig1} \end{figure}\end{document}
and obtain the following figures:
The problem is that now the xlabel and ylabel are too far away from the 3d plots, and I want to move them UP a bit. Is this feasible? Is there some option value to pass into the matlab2tikz
command? Or maybe write some global specification for pgfplots
in the .tex file?
I've been trying to fix this for hours but nothing works. Many thanks for your help!
Note: I cannot do the plots directly in latex using tikzpicture
since the original data files need many manipulations and I prefer doing them in matlab.