I am trying to include multiple 3D figures (created in matlab) into a latex file.

The original 3D figures in matlab look like this:

enter image description here

In the .m file that creates these figures, I use

ylabel('transformed W_t/D_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

\usepackage{pgfplots, pgfplotstable}
 \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.}

and obtain the following figures: enter image description here

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.

  • What has to do the biblatex tag with this? – Aradnix Sep 22 '14 at 0:49

I have figured this out, by simply using:

 matlab2tikz('figure2a_2.tikz', 'height', '\figureheight', 'width', '\figurewidth','extraAxisOptions','zticklabel style={/pgf/number format/fixed},ylabel style={yshift=0.9em}');

for the conversion and have

\pgfplotsset{scaled z ticks=false}

in the .tex file setup. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.