10

I am using the subfigure package to reference parts of a figure. It works just fine when each of the subfigures is a single plot and I want LaTeX to insert labels (a), (b) ... under each. However, for consistency with other figures in my manuscript, I would like to have a single, multi-panel plot where I insert the (a), (b), ... manually (done using lattice in R). I can do this by still using

\subfigure[][]{%
  \label{beta}
  }%

for each subfigure and then inserting the single plot. However, this still gives the labels (a), (b), ... - now superimposed on each other. I would like to get rid of these, whilst still maintaining the functionality of subfigure which allows me to reference individual subfigures. I have tried \renewcommand*{\thesubfigure}{} but that removes the subfigure labels everywhere.

Would you know which command makes the subfigure labels under the plots and how to modify this to the desired effect?

4 Answers 4

15

Here is how I would do:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{caption}

\begin{document}

\begin{figure}[!ht]
  \captionsetup[subfigure]{labelformat=empty}
  \centering
  \subfloat[]{\includegraphics[width=.4\textwidth]{Paris}}\quad
  \subfloat[]{\includegraphics[width=.4\textwidth]{Paris}}
  \caption{Caption about here}
  \label{fig:fig1}
\end{figure}

\end{document}

enter image description here

1
  • Thanks! That was what I needed - I have to admit I did not know about the subfig package. Apr 26, 2011 at 22:45
9

According to the help for the subfigure package, you can just drop the [] in the \subfigure command and it will not number the subfigure:

\documentclass[draft]{article}
\usepackage{graphicx}
\usepackage{subfigure}

\begin{document}


\begin{figure}
    \centering
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \vfill
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \vfill
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \subfigure[]{\includegraphics[width=0.32\textwidth]{demofig}}
    \vfill
    \subfigure{\includegraphics[width=0.5\textwidth]{demofig}}
    \caption{All numbered but the last!}
    \label{fig:demofig}
\end{figure}

\end{document}

This is the result with MiKTeX 2.9:

enter image description here

2
3

Perhaps I am missing the point, but why do you need subfloat in the first place?

\begin{figure}[ht]
\centering
\includegraphics[width=.4\columnwidth]{figures/fig1}\quad
\includegraphics[width=.4\columnwidth]{figures/fig2}
\caption{Caption}
\label{fig:fig1}
\end{figure}
2
  • It seems that prettygully adds the subcaptions to the graphics in the R program.
    – egreg
    Apr 26, 2011 at 9:41
  • 1
    I knew, I should not comment on stuff that I have no idea about...
    – bjoernz
    Apr 26, 2011 at 9:51
3

This works fine.

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}


\begin{document}

\begin{figure}[!ht]
   %\captionsetup[subfigure]{labelformat=empty}
   \centering
   \subfloat{\includegraphics[width=.4\textwidth]{Paris}}\quad
   \subfloat{\includegraphics[width=.4\textwidth]{Paris}}
   \caption{Caption about here}
   \label{fig:fig1}
\end{figure}

\end{document}
1
  • 1
    thanks for this; so basically you are saying that the captionsetup is superfluous? Interesting. Aug 19, 2011 at 4:08

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.