使用“单位矢量比”后截面消失

使用“单位矢量比”后截面消失

我实在找不到解决问题的方法。希望你能帮助我!

我使用 matlab2tikz 在 tikz 中绘制来自 matlab 的 3D 切片图。问题是在设置单位矢量比 = 1 1 1 后,截面消失。没有该命令,除了纵横比之外,一切看起来都很好 ;-)。在 .tikz 文件中,\begin{axis}环境用于设置刻度、标签和纵横比。之后,只需简单\addplot3[surf, ...生成实际图即可。

这是我迄今为止使用的代码,当然缺少许多数据点;-):

\documentclass[12pt, a5paper, german, bibliography=totoc, listof=totoc, parskip=half, numbers=noenddot]{scrreprt}

\usepackage[utf8]{inputenc}

\usepackage{textcomp}

\usepackage[english, ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}

\usepackage{lmodern}

\usepackage{tikz, tikz-3dplot, pgfplots}
\usepackage{datatool}

\usepackage[detect-all,locale=DE]{siunitx}

\usetikzlibrary{shapes, arrows, plotmarks, calc, fpu, positioning, fit, external}
\tikzset{>=latex}
\pgfplotsset{compat=1.9}

\begin{document}

\begin{figure}[htbp]
\begin{tikzpicture}

\begin{axis}[%
view={-37.5}{30},
scale only axis,
scaled ticks=false,
xmin=0,
xmax=0.00320518432167527,
xtick={0,0.0005,0.001,0.0015,0.002,0.0025,0.003},
xticklabels={0, {0,5}, 1, {1,5}, 2, mm, 3},
xmajorgrids,
ymin=0.000732892756480625,
ymax=0.00146578551296125,
ytick={0.000732892756480625,0.00109933913472094,0.00146578551296125},
yticklabels={{0,7}, mm, {1,5}},
ymajorgrids,
z dir=reverse,
zmin=0,
zmax=0.0029315710259225,
ztick={0,0.0005,0.001,0.0015,0.002,0.0025},
zticklabels={0, mm, 1, {1,5}, 2, {2,5}},
zmajorgrids,
axis x line*=bottom,
axis y line*=left,
axis z line*=left,
unit vector ratio*=1 1 1
]

\addplot3[%
surf,
shader=interp,
colormap/blackwhite,
point meta=explicit,
mesh/rows=37]
table[row sep=crcr,header=false,meta index=3] {
0 0.000732892756480625 0 300.000000126657\\
0 0.000773609020729548 0 300.000000214474\\
0 0.000814325284978472 0 300.000000266991\\

...

};
\end{axis}
\end{tikzpicture}%

\label{fig:KH_3D}
\end{figure}

\end{document}

我也尝试了这篇文章的答案:设置单位矢量比

以下是我谈论的情节: 缺失剖面 错误的纵横比

感谢您的帮助!!

相关内容