matlab2tikz を使用した 3D グラフの軸配置

matlab2tikz を使用した 3D グラフの軸配置

複数の 3D 図 (matlab で作成) を LaTeX ファイルに含めるようにしています。

MATLAB の元の 3D 図は次のようになります。

ここに画像の説明を入力してください

これらの図を作成する.mファイルでは、

ylabel('transformed W_t/D_t','VerticalAlignment','bottom')   
xlabel('\lambda_t','VerticalAlignment','bottom')

xlabel と ylabel を上に移動します。

それから私は

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

ファイルを .tikz ファイルに変換します。

ラテックスでは、

\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}

次の数値が得られます。 ここに画像の説明を入力してください

問題は、xlabel と ylabel が 3D プロットから離れすぎているため、少し上に移動したいということです。これは実現可能でしょうか? コマンドに渡すオプション値はありますか? または、 .tex ファイルにmatlab2tikzグローバル仕様を記述するのでしょうか?pgfplots

何時間もこれを修正しようとしましたが、何も機能しません。ご協力ありがとうございます!

tikzpicture注:元のデータ ファイルには多くの操作が必要なので、LaTeX を使用して直接プロットすることはできません。そのため、MATLAB でプロットすることを好みます。

答え1

私は単純に以下を使用してこれを理解しました:

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

変換のために

\pgfplotsset{scaled z ticks=false}

.tex ファイルの設定で。ありがとうございます。

関連情報