2

I tried using subfigure along with a caption for these four images according to the code shown below.

\begin{figure}[H]
%\centering
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g1_2}
    \caption{\SI{10}{\nano\meter}$\times$\SI{10}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{34.768}{\pico\meter}$}
    \label{figp1a}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g2_2}
    \caption{\SI{10}{\nano\meter}$\times$\SI{10}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{45.534}{\pico\meter}$}
    \label{figp1b}
\end{subfigure}

\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g_bilayer_2}
    \caption{\SI{6.5}{\nano\meter}$\times$\SI{6.5}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{47.548}{\pico\meter}$}
    \label{figp1c}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g_bilayer_zoom_2}
    \caption{\SI{2.3}{\nano\meter}$\times$\SI{2.3}{\nano\meter} zoomed in section from fig.\ref{figp1c}, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$}
    \label{figp1d}
\end{subfigure}

\caption{STM imaging of different areas of the epitaxial graphene sample, prior to the deposition.}\label{figp1}
\end{figure}

The image result is as follows. enter image description here

I would like to obtain the boundary of the resulting cross as a new path, which one can draw or fill.

So, I tried to remove the captions and try again with this code

\begin{figure}[H]
%\centering
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g1_2}
    %\caption{\SI{10}{\nano\meter}$\times$\SI{10}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{34.768}{\pico\meter}$}
    \label{figp1a}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g2_2}
    %\caption{\SI{10}{\nano\meter}$\times$\SI{10}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{45.534}{\pico\meter}$}
    \label{figp1b}
\end{subfigure}

\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g_bilayer_2}
    %\caption{\SI{6.5}{\nano\meter}$\times$\SI{6.5}{\nano\meter} raw image of the surface of epitaxial graphene, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$, $z=0\to\SI{47.548}{\pico\meter}$}
    \label{figp1c}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    %\centering
    \includegraphics[width=\linewidth]{g_bilayer_zoom_2}
    %\caption{\SI{2.3}{\nano\meter}$\times$\SI{2.3}{\nano\meter} zoomed in section from fig.\ref{figp1c}, $\left(U_T=+\SI{100}{\milli\volt}, I_T=\SI{500}{\pico\ampere}\right)$}
    \label{figp1d}
\end{subfigure}

\caption{STM imaging of different areas of the epitaxial graphene sample, prior to the deposition.}\label{figp1}
\end{figure}

Now the image result is as follows

enter image description here

This image concept is Ok with me, but unfortunately, the labels for the four images namely \label{figp1a}, \label{figp1b}, \label{figp1c} and \label{figp1d} do not seem to work any more, because I commented the captions within the subfigures. I need the second image with the labels working.

  • Do you want to print only (a) but not the text? If you remove everything, how to refer to 3.1(a) if it does not exist? – Sigur Jan 2 '18 at 19:32
  • 1
    Please do not post fragments only – user31729 Jan 2 '18 at 19:37
  • No, but I should be able to refer to the image itself as 3.1(a), but I will put (a), (b), (c), (d) on the image corners within the image area not separately. – ubuntu_noob Jan 2 '18 at 19:38
  • @ChristianHupfer: What do you mean? – ubuntu_noob Jan 2 '18 at 19:40
  • @ubuntu_noob: You're posting non-compilable fragments of code. There's no \documentclass etc. here, no list of used packages, no \begin{document}...\end{document} and the images are unavailable to us as well – user31729 Jan 2 '18 at 19:41
4

To make @Mico happy. The subcaption package has a command for this, namely \phantomsubcaption.

\documentclass{article}
\usepackage{todonotes}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}[t]{0.49\textwidth}
    \missingfigure[figwidth=\linewidth]{marmots are cute}
    \phantomsubcaption
    \label{figp1a}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    \missingfigure[figwidth=\linewidth]{koala bears are also cute}
    \phantomsubcaption
    \label{figp1b}
\end{subfigure}

\begin{subfigure}[t]{0.49\textwidth}
    \missingfigure[figwidth=\linewidth]{but in this forum, people love ducks}
    \phantomsubcaption
    \label{figp1c}
\end{subfigure}%
\hfill
\begin{subfigure}[t]{0.49\textwidth}
    \missingfigure[figwidth=\linewidth]{I dunno why}
    \phantomsubcaption
    \label{figp1d}
\end{subfigure}
\caption{Marmots, koala bears and ducks.}
\end{figure}
The most important message is the one of Figure~\ref{figp1a}. But you may also
like the one of Figure~\ref{figp1b}. Figure~\ref{figp1d} contains a question.
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.