将两个地块合并为一个并粘贴

将两个地块合并为一个并粘贴

如何合并两个(三个)图,使得下一个图(图形)的垂直刻度被前一个图(图形)隐藏?并且最终图形在文中被称为一个图形(而不是两个图形或子图形)?

在此处输入图片描述

答案1

如果绘图预先作为单独的图像存在......

只需为两个图像选择相同的高度,然后使用屏蔽器\kern遮盖右侧图像的轴标签。

编辑以简化语法,一点点,用

\underlay{<height>}{<kern>}{<leftward-image>}{<rightward-image>}

\addunderlay{<height>}{<kern>}{<prior-underlay-or-addunderlay>}{<rightward-image>}

妇女权利委员会:

\documentclass{article}
\documentclass{article}
\usepackage{graphicx,stackengine}
\newcommand\underlay[4]{%
  \stackengine{0pt}%
  {\kern#2\includegraphics[height=#1]{#4}}%
  {\includegraphics[height=#1]{#3}}%
  {O}{l}{F}{F}{L}%
}
\newcommand\addunderlay[4]{%
  \stackengine{0pt}%
  {\kern#2\includegraphics[height=#1]{#4}}%
  {#3}%
  {O}{l}{F}{F}{L}%
}
\begin{document}
\begin{figure}[ht]
\centering
\underlay{1.5in}{120pt}{example-image-a}{example-image-b}
\caption{This is one figure}
\end{figure}

\begin{figure}[ht]
\centering
\addunderlay{1in}{160pt}{%
  \underlay{1in}{80pt}{example-image-a}{example-image-b}%
}{example-image-c}

\caption{This is one figure}
\end{figure}

\begin{figure}[ht]
\centering
\addunderlay{.8in}{192pt}{%
  \addunderlay{.8in}{128pt}{%
    \underlay{.8in}{64pt}{example-image-a}{example-image-b}%
  }{example-image-c}
}{example-image}

\caption{This is one figure}
\end{figure}
\end{document} 

在此处输入图片描述


原始代码版本,不包含辅助宏:

\documentclass{article}
\usepackage{graphicx,stackengine}
\begin{document}
\begin{figure}[ht]
\centering
\stackengine{0pt}
{\kern120pt\includegraphics[height=1.5in]{example-image-b}}
{\includegraphics[height=1.5in]{example-image-a}}
{O}{l}{F}{F}{L}
\caption{This is one figure}
\end{figure}

\begin{figure}[ht]
\centering
\stackengine{0pt}
{\kern160pt\includegraphics[height=1in]{example-image-c}}
{\stackengine{0pt}
 {\kern80pt\includegraphics[height=1in]{example-image-b}}
 {\includegraphics[height=1in]{example-image-a}}
 {O}{l}{F}{F}{L}}
{O}{l}{F}{F}{L}
\caption{This is one figure}
\end{figure}

\begin{figure}[ht]
\centering
\stackengine{0pt}
 {\kern192pt\includegraphics[height=.8in]{example-image}}{\stackengine{0pt}
 {\kern128pt\includegraphics[height=.8in]{example-image-c}}
 {\stackengine{0pt}
  {\kern64pt\includegraphics[height=.8in]{example-image-b}}
  {\includegraphics[height=.8in]{example-image-a}}
  {O}{l}{F}{F}{L}}
 {O}{l}{F}{F}{L}}
 {O}{l}{F}{F}{L}
\caption{This is one figure}
\end{figure}
\end{document} 

相关内容