
Estou tentando incluir várias figuras 3D (criadas em Matlab) em um arquivo de látex.
As figuras 3D originais em matlab são assim:
No arquivo .m que cria essas figuras, eu uso
ylabel('transformed W_t/D_t','VerticalAlignment','bottom')
xlabel('\lambda_t','VerticalAlignment','bottom')
para mover o xlabel e o ylabel para cima.
Então eu uso
matlab2tikz('figure2a_2.tikz', 'height', '\figureheight', 'width', '\figurewidth','extraAxisOptions','zticklabel style={/pgf/number format/fixed}')
para converter o arquivo em um arquivo .tikz.
Em látex, eu corro
\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}
e obtenha os seguintes números:
O problema é que agora xlabel e ylabel estão muito longe dos gráficos 3D e quero movê-los um pouco para CIMA. Isso é viável? Existe algum valor de opção para passar para o matlab2tikz
comando? Ou talvez escreva alguma especificação global pgfplots
no arquivo .tex?
Estou tentando consertar isso há horas, mas nada funciona. Muito obrigado pela sua ajuda!
Nota: Não posso fazer os gráficos diretamente em látex, tikzpicture
pois os arquivos de dados originais precisam de muitas manipulações e prefiro fazê-los em matlab.
Responder1
Eu descobri isso simplesmente usando:
matlab2tikz('figure2a_2.tikz', 'height', '\figureheight', 'width', '\figurewidth','extraAxisOptions','zticklabel style={/pgf/number format/fixed},ylabel style={yshift=0.9em}');
para a conversão e ter
\pgfplotsset{scaled z ticks=false}
na configuração do arquivo .tex. Obrigado.