Graphics, Figures & Tablesproblem with placing images

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
maniit
Posts: 2
Joined: Fri Sep 10, 2010 4:44 pm

problem with placing images

Post by maniit »

Can any1 help me as i'am urgently in need of the solution to my problem. I want the first row of frames to be (a) and the second row of frames as (b). Between (a) and (b) i want to reduce the white space from what latex provides by default. thanx in advance

My code is
\begin{document}
%First row of frames
\begin{figure*}[ht]
\hspace{1cm}\subfigure[]{

\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage}

\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{38.eps}
\end{minipage}

\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{63.eps}
\end{minipage}

\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{114.eps}
\end{minipage}

\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{229.eps}
\end{minipage}
}
\end{figure*}

%Second row of frames
\begin{figure*}[ht]
\hspace{1cm}\subfigure[]{
\begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage} \begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage} \begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage} \begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage} \begin{minipage}[t]{1.2in}
\includegraphics[width=1.2in]{1.eps}
\end{minipage}
}
\end{figure*}

\end{document}
Last edited by maniit on Sat Sep 11, 2010 4:28 pm, edited 3 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

problem with placing images

Post by gmedina »

Hi,

you seem to be using the obsolete subfigure package; use subfig (or subcaption) instead.

Please provide compilable and minimal code, not just snippets.

Anyway, you could try something like this (delete the demo option for graphicx (I just added it to make my code compilable for everyone)):

Code: Select all

\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx}% demo option  to make the code compilable for everyone
\usepackage[margin=2cm]{geometry}% to avoid text overflows

\begin{document}

\begin{figure*}[ht]\centering
  \subfloat[]{%
    \includegraphics[width=1.2in]{test1.eps}}\hfill
  \subfloat[]{%
    \includegraphics[width=1.2in]{test38.eps}}\hfill
  \subfloat[]{%
    \includegraphics[width=1.2in]{test63.eps}}\hfill
  \subfloat[]{%
    \includegraphics[width=1.2in]{test114.eps}}\hfill
  \subfloat[]{%
    \includegraphics[width=1.2in]{test229.eps}}\\
  \hfil\subfloat[]{%
    \includegraphics[width=1.2in]{test5.eps}}\qquad
  \subfloat[]{%
    \includegraphics[width=1.2in]{test6.eps}}\qquad
  \subfloat[]{%
    \includegraphics[width=1.2in]{test11.eps}}\qquad
  \subfloat[]{%
    \includegraphics[width=1.2in]{test14.eps}}\hfil
\end{figure*}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
maniit
Posts: 2
Joined: Fri Sep 10, 2010 4:44 pm

Re: problem with placing images

Post by maniit »

hi

Thanks gmedina, but iam not able 2 solve my problem, can u pls help. i have re-framed the question in my last post.

thank u
Post Reply