为什么我的 Tikz 图表出现在页面顶部的文本上方?

为什么我的 Tikz 图表出现在页面顶部的文本上方?

我不知道为什么我的图表会出现在页面顶部。当我将整个稿件放在一个文件中时,这种情况不会发生。现在,我已经创建了单独的文件,图表就出现在页面顶部。

梅威瑟:

\documentclass[11pt,fleqn,table]{book} % Default font size and left-justified equations
\usepackage{setspace}
\doublespacing
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepackage{pgfplotstable}
\usepgfplotslibrary{polar}
\usepgflibrary{shapes.geometric}
\usetikzlibrary{calc}
\usepackage{tikz}

\usepackage{caption}
\usepackage{booktabs}
\usepackage{changepage}

\usepackage{array}

\usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,letterpaper]{geometry} % Page margins
\usetikzlibrary{patterns,positioning}

\definecolor{ocre}{RGB}{52,177,201} % Define the orange color used for highlighting throughout the book
% Font Settings
\usepackage{avant} % Use the Avantgarde font for headings

%
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Symbol, Chancery and Computer Modern fonts
\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[utf8]{inputenc} % Required for including letters with accents
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{amsthm}
%\usepackage{amsmath}
\usepackage{mathtools}

%----------------------------------------------------------------------------------------
%   Definitions of new commands
%----------------------------------------------------------------------------------------
\def\R{\mathbb{R}}
\newcommand{\cvx}{convex}

\begin{document}

The following models ..., Eq.\ref{f}, ..., Eq.\ref{A}, and ... Fig.\ref{Fig:1}, ...:
\\

\begin{equation}\label{f} 
\varphi (\sigma_{(\Phi)}, \mu_{(\Phi)}, \aleph(\cdot)) = \sum_{i=-1}^{n}\sigma_{(T+i)}*\bigg[1+\sum_{i=-1}^{n}\mu^{K}_{(T+i)}\bigg]^{-1}+\aleph(\cdot)
\end{equation}

\begin{equation}\label{A}
\aleph (\sigma_{(\Phi)}, \mu_{(\Phi)}, \daleth) = \daleth   \bigg\{\sum_{i=-1}^{n}\sigma_{(T+i)}\bigg\}\
+(1-\daleth)\bigg\{\bigg[1+\sum_{i=-1}^{n}\mu^{K}_{(T+i)}\bigg]^{-1}\bigg\}
\end{equation}
\begin{itemize}
\begin{figure}
    \centering

\begin{tikzpicture}
\begin{axis}[axis x line=bottom,
    axis y line=left,
    domain=0:1,
    axis on top,xmin=0]

\addplot[pattern=crosshatch,
    pattern color=red!30!white,
    draw=red!30!white]
    {x^e} \closedcycle;
        \node[anchor=north west] at (-.5,-1.5) {$\Phi$};
  \end{axis}  
\begin{axis}[
    axis x line=top,
    axis y line=right,
    domain=0:1,
    x dir = reverse,
    y dir = reverse,
    axis on top,xmin=0]
      \addplot[pattern=crosshatch,
    pattern color=blue!30!white,
    draw=blue!30!white]
    {x^e} \closedcycle;
    \end{axis}
    \node[right=3em of current axis]{$sigma$};
    \node[left=3em of current axis]{$mu$};
    \node[above=3em of current axis]{$\Phi_{(\sigma)}$};
    \node[below=3em of current axis]{$\Phi_{(\mu)}$};
\end{tikzpicture}
 %\includegraphics{}
    \caption{... and ...}
    \label{Fig:1}
\end{figure}
  \item $0 \leq \sigma \leq 1$ is ....
\end{itemize}

\begin{itemize}
  \item $0 \leq \mu \leq 1$ is ....
\end{itemize}

\begin{itemize}
  \item $1 - \sigma - \mu = \aleph \Rightarrow$ is ... \ref{A}. 
\end{itemize}

\begin{itemize}
    \item $0 < \Phi \leq 1$ is ....
\end{itemize}

\begin{itemize}
    \item $0 < \daleth < 1$ is .....
\end{itemize}

\end{document}

相关内容