使用环绕图形的警告

使用环绕图形的警告

我有一段时间失去了理智,无法摆脱以下警告。

line 25 Collision between wrapping environments
line 29 Stationary wrapfigure forced to float
line 31 Stationary wrapfigure forced to float

我尝试了很多方法,尤其是分别插入 \par 或空白行,但仍然收到此类警告,并且互联网上的所有解决方案均无效。以下是 MWE:

\documentclass[]{scrbook}

\usepackage{graphicx}
\usepackage{wrapfig}

\begin{document}

\textbf{Columnwise mean and standard deviation}
is not an advanced metric and does not reveal any hidden relations, but functions as a quick sanity check. The means and standard deviations of each column are plotted on a log scale. If the plotted values follow the diagonal, the data has comparable means and standard deviations. Moreover, the general results do appear to have a correlation with how well these values follow the diagonal, meaning that if many points deviate from the diagonal, it is likely the cumulative distributions and quantitative measures will follow a similar pattern of deviations.
\begin{figure}[ht!]
\centering
  \includegraphics[width=\linewidth]{example_mean.png}
  \caption{An example of the visualization of the columnwise mean and standard deviation}
  \label{fig:examplemean}
\end{figure}
\textbf{Cumulative Sum} visually inspects the similarity between the distributions per column, the cumulative sum of each column for both the real and the fake data on top of each other are plotted.
This gives one a quite thorough understanding of a column with just one plot, and works for both categorical and continuous columns. Note that this plot does not give any insights into the relations between columns, giving it limited representational power for the whole table. 
\begin{wrapfigure}{r}{0.35\textwidth}
\centering
\includegraphics[width=\linewidth]{example_cumsum.png}
\caption{An example of the visualization of the cumulative sum}
\end{wrapfigure}
\textbf{Distribution} 
simply shows the distribution of the values of each column plotted with the value on the x-axis and the probability on the y-axis. The bar chart in the background of the figure shows how often values from a certain range (bin) appeared in this specific column of each, the real and fake dataset.
\begin{wrapfigure}{r}{0.35\textwidth}
\centering
\includegraphics[width=\linewidth]{example_dist.png}
\caption{An example of the visualization of the distribution}
\end{wrapfigure}
\textbf{Correlations}, the fourth visualization, shows a association table for the real and synthetic data. It gives a clear understanding of what columns have associations with each other, and shows where the synthetic data diverges, indicating struggles that the model had with modeling this relationship. Associated columns are coloured in red, disassociated  columns in blue.
\begin{figure}[ht!]
\includegraphics[width=\linewidth]{example_asso.png}
\caption{An example of the visualization of the correlations via an association table}
\label{fig:exampleasso}
\end{figure}
\textbf{Principle Components Analysis (PCA)} figures show the first two components of a PCA as a scatter plot. PCA is method to reduce high dimensionality of data by using dependencies between dimensions and forming fewer principle components (PCs). With theses PCs, the data can be presented in a lower-dimensional form without losing too much information. Dependencies between dimension can already be seen in the association table above. With PCA again can be checked if the fake data includes the same association between columns as the real data. If the two scatter plots of the first two PCs are similar, one can assume that the associations are also similar, as the dimensionality reduction of PCA into this first two PCs is based on these correlations between the columns.
\begin{figure}[ht!]
  \includegraphics[width=\linewidth]{example_pca.png}
  \caption{An example of the visualization of the first two components of the PCA}
  \label{fig:examplepca}
\end{figure}

\end{document}

以下是使用的图片:

答案1

如果你使用example-image这些图像,那么你会收到警告

Package wrapfig Warning: Collision between wrapping environments on input line 
Package wrapfig Warning: Stationary wrapfigure forced to float on input line 29

查看输出

在此处输入图片描述

您可以看到问题在于\textbf“部分”没有产生足够的空间来容纳包装的图形,并且其中一个图形在页面上太低而无法容纳。

更改\textbf\paragraph你仍然会收到警告,但除了一些拉伸的文本外,结果更可接受

在此处输入图片描述

然后,如果您wrapfig对分页符处插入的行数提供一些帮助,并确保将全宽图形插入段落之间而不是段落中间,那么效果就很好:

在此处输入图片描述

\documentclass[]{scrbook}

\usepackage{graphicx}
\usepackage{wrapfig}

\begin{document}

\paragraph{Columnwise mean and standard deviation}
is not an advanced metric and does not reveal any hidden relations, but functions as a quick sanity check. The means and standard deviations of each column are plotted on a log scale. If the plotted values follow the diagonal, the data has comparable means and standard deviations. Moreover, the general results do appear to have a correlation with how well these values follow the diagonal, meaning that if many points deviate from the diagonal, it is likely the cumulative distributions and quantitative measures will follow a similar pattern of deviations.

\begin{figure}[ht!]
\centering
  \includegraphics[width=\linewidth]{example-image.png}
  \caption{An example of the visualization of the columnwise mean and standard deviation}
  \label{fig:examplemean}
\end{figure}


\begin{wrapfigure}[8]{r}{0.35\textwidth}
\vspace{-2\baselineskip}
\centering
\includegraphics[width=\linewidth]{example-image.png}
\caption{An example of the visualization of the cumulative sum}
\end{wrapfigure}
\paragraph{Cumulative Sum} visually inspects the similarity between the distributions per column, the cumulative sum of each column for both the real and the fake data on top of each other are plotted.
This gives one a quite thorough understanding of a column with just one plot, and works for both categorical and continuous columns. Note that this plot does not give any insights into the relations between columns, giving it limited representational power for the whole table. 

\paragraph{Distribution} 
simply shows the distribution of the values of each column plotted with the value on the x-axis and the probability on the y-axis. The bar chart in the background of the figure shows how often values from a certain range (bin) appeared in this specific column of each, the real and fake dataset.

\begin{wrapfigure}[7]{r}{0.35\textwidth}
\vspace{-2\baselineskip}
\centering
\includegraphics[width=\linewidth]{example-image.png}
\caption{An example of the visualization of the distribution}
\end{wrapfigure}
\paragraph{Correlations}, the fourth visualization, shows a association table for the real and synthetic data. It gives a clear understanding of what columns have associations with each other, and shows where the synthetic data diverges, indicating struggles that the model had with modeling this relationship. Associated columns are coloured in red, disassociated  columns in blue.

\begin{figure}[ht!]
\includegraphics[width=\linewidth]{example-image.png}
\caption{An example of the visualization of the correlations via an association table}
\label{fig:exampleasso}
\end{figure}
\paragraph{Principle Components Analysis (PCA)} figures show the first two components of a PCA as a scatter plot. PCA is method to reduce high dimensionality of data by using dependencies between dimensions and forming fewer principle components (PCs). With theses PCs, the data can be presented in a lower-dimensional form without losing too much information. Dependencies between dimension can already be seen in the association table above. With PCA again can be checked if the fake data includes the same association between columns as the real data. If the two scatter plots of the first two PCs are similar, one can assume that the associations are also similar, as the dimensionality reduction of PCA into this first two PCs is based on these correlations between the columns.

\begin{figure}[ht!]
  \includegraphics[width=\linewidth]{example-image.png}
  \caption{An example of the visualization of the first two components of the PCA}
  \label{fig:examplepca}
\end{figure}

\end{document}

虽然我现在注意到隐藏了第二个包装图的标题,所以也许可以将其提前移动\paragraph{Distribution}

在此处输入图片描述

使用示例图像时,您无法在页面上以全宽显示两个图形,因为它们太高,所以最终会变成 4 页。

相关内容