Tikz 图形神秘地与上方的文本重叠 - 在某些情况下仅

Tikz 图形神秘地与上方的文本重叠 - 在某些情况下仅

一个图形(两个 TikZ 图形并排,使用subfigure)与上面的文本重叠,但没有明显的原因。添加一个额外的单词段落(“文本”)时,不会出现此问题。相反,图形太靠近页码(见附图)。

\documentclass[parskip=half, a4paper, titlepage=firstiscover]{scrbook}
\usepackage[ngerman]{babel}

\usepackage[T1]{fontenc}    
\usepackage[utf8]{inputenc} 

\usepackage{flafter} 
\usepackage[section]{placeins}

\usepackage[pass]{geometry}

\usepackage[locale=DE]{siunitx}
\sisetup{detect-all, group-digits=integer, range-phrase = { bis }}
\AtBeginDocument{\sisetup{detect-all}}%{\sisetup{math-rm=\mathrm, text-rm=\rmfamily}}
\DeclareSIUnit{\year}{a}
\DeclareSIUnit{\euro}{\mbox{EUR}}

\usepackage{blindtext}

\usepackage{graphicx}
\usepackage{pgfplots}
\SendSettingsToPgf
\usepackage{csquotes}
\usepackage{caption, subcaption}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{external} 
\tikzexternalize[up to date check=diff]

\begin{document}
\blindtext[3]

    \begin{figure}[h]
        \centering
        \begin{subfigure}[b]{0.45\linewidth}
            \centering
            \input{mwe_fig.tex}
            \caption{Caption 1}
            \label{fig:example1}
        \end{subfigure}
        \hfill
        \begin{subfigure}[b]{0.45\linewidth}
            \centering
            \input{mwe_fig.tex}
            \caption{Caption 2}
            \label{fig:example2}
        \end{subfigure} 
        \caption{Caption}
        \label{fig:example}
    \end{figure}

\end{document}

这些图形是用和创建的matlab2tikzwidth并且height是相对于设置的\linewidth(见下文)。

  \begin{tikzpicture}

\begin{axis}[%
width=0.594\linewidth,
height=0.6\linewidth,
at={(0\linewidth,0\linewidth)},
scale only axis,
point meta min=140,
point meta max=164.662536165299,
xmin=0,
xmax=100,
tick align=outside,
xlabel style={font=\color{white!15!black}},
xlabel={Taxis},
ymin=0,
ymax=200,
ylabel style={font=\color{white!15!black}},
ylabel={CS-PKW},
zmin=0,
zmax=500,
zlabel style={font=\color{white!15!black}},
zlabel={Verlust in \si[per-mode=symbol]{\kilo\euro\per\year}},
view={-37.5}{30},
axis background/.style={fill=white},
axis x line*=bottom,
axis y line*=left,
axis z line*=left,
xmajorgrids,
ymajorgrids,
zmajorgrids
]

\addplot3[%
surf,
shader=flat corner, draw=black, z buffer=sort, colormap={mymap}{[1pt] rgb(0pt)=(0,0.180392,0.313726); rgb(1pt)=(0.0112418,0.191895,0.325752)}, mesh/rows=11]
table[row sep=crcr, point meta=\thisrow{c}] {%
%
x   y   z   c\\
0   0   164.662536165299    164.662536165299\\
0   10  169.722738787299    169.722738787299\\
};
\end{axis}
\end{tikzpicture}%

图形重叠文本

图表不重叠但距离页码太近

您有什么建议吗?提前谢谢您!

相关内容