我试图获取三幅此形状的子图:
我想用包 subfigures 来做这件事,因为我的文档的其余部分都与该包有关,而且它似乎与包 subcaption 不兼容。我看到了几个相关的问题(如这我不需要任何额外的包(一个),但我需要使用的是 subfigure 包(不是 subfig 也不是 subcaption)。
到目前为止我尝试过的一切甚至都无法编译。
答案1
和subfigure
\documentclass{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{pgfplots}
\usepackage{subcaption}
\begin{document}
\begin{figure}[ht]
\begin{subfigure}{.5\textwidth} % this sets the figure to be max half the width of the page
\centering
% include first image
\includegraphics[width=.9\linewidth]{example-image-b} % this sets the image to fill 90% of the available space -> 45% of the line width in total.
\caption{Put your sub-captionB here}
\label{fig:sub-first}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\centering
% include second image
\includegraphics[width=.9\linewidth]{example-image-c}
\caption{Put your sub-captionC here}
\label{fig:sub-second}
\end{subfigure}
\label{fig:fig}
\begin{subfigure}{\textwidth}
\centering
% include first image
\includegraphics[width=.45\linewidth]{example-image-a} % this width should be half of the width of the other two images
\caption{Put your sub-captionA here}
\label{fig:sub-firstA}
\end{subfigure}
\caption{Put your caption here}
\end{figure}
\end{document}
和subfig/subfloat
\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[ht]%
\centering
\subfloat[]{\includegraphics{UEB01-repograph1.pdf}\label{fig:a}} \quad
\subfloat[]{\includegraphics{UEB01-repograph2.pdf}\label{fig:b}}\\
\subfloat[]{\includegraphics{UEB01-repograph3.pdf}\label{fig:c}}%
\caption{Some caption}%
\label{some-label}%
\end{figure}
\end{document}
编辑1
添加展示位置array
\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[ht]%
\centering
\subfloat[]{\includegraphics{UEB01-repograph1.pdf}\label{fig:a}} \quad
\subfloat[]{\includegraphics{UEB01-repograph2.pdf}\label{fig:b}}\\
\subfloat[]{\includegraphics{UEB01-repograph3.pdf}\label{fig:c}}%
\caption{Some caption}%
\label{some-label}%
\end{figure}
\begin{figure*}[t!]
$\begin{array}{cc}
\includegraphics[width=0.5\textwidth]{FIGURE_1.pdf} &
\includegraphics[width=0.5\textwidth]{FIGURE_2.pdf}\\
\textbf{fjhfj}& \textbf{fjhfj}\\
\multicolumn{2}{c}{\includegraphics[width=0.5\textwidth]{FIGURE_3.pdf}}\\
\multicolumn{2}{c}{\textbf{fjhfj}}
\end{array}$
\caption[My beautiful figure.]{\label{fig:label}My beautiful figure}
\end{figure*}
\end{document}
和minipage
\documentclass{article}
\usepackage{graphicx,subcaption}
\begin{document}
\begin{figure}[htp]
\centering
\begin{minipage}[b]{0.58\textwidth} % almost 60%
\begin{subfigure}{0.49\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{Mystery shack}
\end{subfigure}%
\hfill
\begin{subfigure}{0.49\textwidth}
\includegraphics[width=\textwidth]{example-image-b}
\caption{Nice landscape}
\end{subfigure}
\end{minipage} \par
\begin{minipage}[b]{0.38\textwidth} % almost 40%
\includegraphics[width=\textwidth]{example-image}
\caption{Rainbow gnome}
\end{minipage}%
\caption{Gravity falls}
\end{figure}
\end{document}