将图形对齐在两列纸上

将图形对齐在两列纸上

我想让图表在两栏纸上对齐 在此处输入图片描述

我希望图 8 与图 11 对齐,并且图 9 和图 12 也同样如此。乳胶代码:

\begin{figure}[t]
  \centering  
  \includegraphics[scale=0.3]{figuresimulation1}
  \caption{The active power tracking }
\end{figure}
\begin{figure}
  \centering  
  \includegraphics[scale=0.3]{figuresimulation2}
  %\vspace{0.2\baselineskip}\vspace{-\parskip}
  \caption{The reactive power tracking  } 
\end{figure}
blablablablabalabal.
\begin{figure}[!hp]
  \centering
  \includegraphics[scale=0.3]{figuresimulation3}
  % \vspace{0.2\baselineskip}\vspace{-\parskip} 
  \caption{The stator currents }
\end{figure}\\
blablablablabalabal. \\
blablablablabalabal 
\\
\\
\\
\vspace{0.6\baselineskip}\vspace{-\parskip} 
\begin{figure}
  \centering
  \includegraphics[scale=0.2]{figuresimulation4}
  \vspace{0.5\baselineskip}\vspace{-\parskip}
  \caption{The reactive power tracking }     
\end{figure}\\
\\
\begin{figure}
  \centering
  \includegraphics[scale=0.3]{FFTAnalysisToolResult}
  \vspace{0.5\baselineskip}\vspace{-\parskip} 
  \caption{The reactive power tracking }
\end{figure}
blablablablabalabal.`

答案1

A)如果所有标题只能放在一行中

基本上,只需为四幅图像设置相同的高度即可。要找到最佳高度,请取较宽图形的尺寸,假设为 320x200 像素。由于最大宽度(300 像素)应为\linewidth,因此四幅图像的最大高度应为 200/320 像素 = 0.625\linewidth,仅此而已。

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\begin{figure}[!t]
\centering
\includegraphics[height=.625\linewidth]{example-image-a}
\caption{a short caption}   
\end{figure}
\begin{figure}[!t]
\centering
\includegraphics[height=.625\linewidth]{example-image-1x1}
\caption{a short caption}   
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[height=.625\linewidth]{example-image-golden-upright}
\caption{a short caption}   
\end{figure}
\begin{figure}[!t]
\centering
\includegraphics[height=.625\linewidth]{example-image-16x10}
\caption{a short caption}   
\end{figure}
\lipsum[1-10]
\end{document}

b) 如果字幕占用可变的垂直空间

一种简单的方法是将图像和标题包含在minipage固定比例的 内。这样可以将具有特定宽度(假设\linewidth 为本例)和高度(假设为\linewidth)的内容在顶部或底部对齐。然后您需要估计允许标题的垂直空间(假设 0.3\linewidth 就足够了)。因此,我们可以将高度图像缩放到 ,将0.7\linewidth宽度图像缩放到1\linewidth (请注意,现在是小页面内行的宽度,而不是小页面外行的宽度,尽管在本例中没有改变)尽可能使用 来keepaspectratio保持高度-宽度比例。

使用\fbox{}小页面周围的内容更容易理解如何帮助放置图形:

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\begin{figure}[!t]
\fbox{\begin{minipage}[c][\linewidth][t]{\linewidth}\centering
\includegraphics[width=\linewidth,height=.7\linewidth,keepaspectratio]{example-image-a}
\caption{A medium caption. A medium caption. A medium caption.} 
\end{minipage}}
\end{figure}
\begin{figure}[!t]
\fbox{\begin{minipage}[c][\linewidth][t]{\linewidth}\centering
\includegraphics[width=\linewidth,height=.7\linewidth,keepaspectratio]{example-image-1x1}
\caption{a short caption}   
\end{minipage}}
\end{figure}
\begin{figure}[t]
\fbox{\begin{minipage}[c][\linewidth][t]{\linewidth}\centering
\includegraphics[width=\linewidth,height=.7\linewidth,keepaspectratio]{example-image-golden-upright}
\caption{a short caption}   
\end{minipage}}
\end{figure}
\begin{figure}[!t]
\fbox{\begin{minipage}[c][\linewidth][t]{\linewidth}\centering
\includegraphics[width=\linewidth,height=.7\linewidth,keepaspectratio]{example-image-16x10}
\caption{A long caption. A long caption. A long caption.A long caption.A long caption. A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.}
\end{minipage}}
\end{figure}
\lipsum[1-10]
\end{document}

但是这会浪费一些小页面空间,但是如果您在小页面中 更改[t]为紧接着图像之后,当短标题留下一些可用空间时,您可以避免最大高度限制为 0.7\linewidth: [b]\vfill

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\begin{figure}[!t]
\begin{minipage}[c][\linewidth][b]{\linewidth}\centering
\includegraphics[width=\linewidth]{example-image-a}\vfill
\caption{A medium caption. A medium caption. A medium caption. A medium caption.}   
\end{minipage}
\end{figure}
\begin{figure}[!t]
\begin{minipage}[c][\linewidth][b]{\linewidth}\centering
\includegraphics[height=.9\linewidth]{example-image-1x1}\vfill
\caption{a short caption}   
\end{minipage}
\end{figure}
\begin{figure}[t]
\begin{minipage}[c][\linewidth][b]{\linewidth}\centering
\includegraphics[height=.9\linewidth]{example-image-golden-upright}
\vfill
\caption{a short caption}   
\end{minipage}
\end{figure}
\begin{figure}[!t]
\begin{minipage}[c][\linewidth][b]{\linewidth}\centering
\includegraphics[width=\linewidth,height=.7\linewidth,keepaspectratio]{example-image-16x10}\vfill
\caption{A long caption. A long caption. A long caption.A long caption.A long caption. A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.A long caption.}
\end{minipage}
\end{figure}
\lipsum[1-10]
\end{document}

姆韦

相关内容