Graphics, Figures & TablesArrangement for Set of Figures with Caption

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
baxy
Posts: 1
Joined: Sun Dec 09, 2012 7:30 pm

Arrangement for Set of Figures with Caption

Post by baxy »

Hello,

Could anyone help me to figure out hot to format the following figures?

Code: Select all

\documentclass{article}
\usepackage{graphics,eurosym,latexsym}
\usepackage{times}
\usepackage{listings}
\usepackage{mathtools}
\lstset{columns=fixed,basicstyle=\ttfamily,numbers=left,numberstyle=\tiny,stepnumber=5,breaklines=true}
\bibliographystyle{plain}
\oddsidemargin=0cm
\evensidemargin=0cm
\usepackage{pst-all}
\usepackage{enumerate}
\newcommand{\be}{\begin{enumerate}}
\newcommand{\ee}{\end{enumerate}}
\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}
\newcommand{\I}{\item}
\newcommand{\ty}{\texttt}
\textwidth=16cm
\textheight=22cm

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,chains}
\usepackage{pgfplots}
\usepackage{verbatim}
\usetikzlibrary{calc}

\usepackage{amsthm}

\newtheorem{defn}{Definition}
\newtheorem{fac}{Fact}
\newtheorem{thm}{Theorem}
\newtheorem{problem}{Problem}
\newtheorem{lem}{Lemma}
\newtheorem{mdl}{Model}
\newtheorem{condition}{Condition}
\newtheorem{fc}{Fact}
\usepackage{latexsym}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{qtree}
\usepackage{graphicx}
\usepackage{epsf}
\usepackage{multirow} 

\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{amsfonts}

\newlength{\mylen}
\addtolength{\mylen}{\baselineskip}
\addtolength{\mylen}{8pt}
\newcommand\myvspace{\rule{0pt}{1pt}\vspace*{-\mylen}}

 
\begin{document}

\begin{figure}
\begin{minipage}[p]{0.5\linewidth}
\begin{tikzpicture}[scale=0.5]

\draw[|<->|,
      >          = latex,
      line width = .3pt] (-6,3)--
                         (-6,7.7)node[midway,
                                      left]{\it $A[i]$};  
\draw[|<->|,
      >          = latex,
      line width = .3pt] (-4,3.5)--
                         (3.5,3.5)node[midway,
                                      above]{\it $x$};  
                                      \path[draw] (-5,3)   node [left] {$S$}
         -- (-4,3) coordinate  (A) node [below left] {$i$} 
         -- (4, 3) coordinate (E) node [below] {$i+x+1$}
         -- (5, 3) 
;
\draw (2,3) node {$\bigotimes$};
\draw (2,0) node {$\bigotimes$};
\draw (2,-3) node {$\diamondsuit$};

\draw (0,3) node {$\diamondsuit$};
\draw (0,0) node {$\bigotimes$};
\draw (0,-3) node {$\diamondsuit$};

\draw (4.5,3) node {$\bigodot$};
\draw (4.5,0) node {$\bigotimes$};
\draw (4.5,-3) node {$\diamondsuit$};
\end{tikzpicture}


\end{minipage}
\hspace{0.5cm}

\begin{minipage}[p]{0.5\linewidth}
\begin{tikzpicture}[scale=0.5]

\draw[|<->|,
      >          = latex,
      line width = .3pt] (-4,3.5)--
                         (3.5,3.5)node[midway,
                                      above]{\it $x$};  
\draw[|<->|,
      >          = latex,
      line width = .3pt] (-6,3)--
                         (-6,7.7)node[midway,
                                      left]{\it $A[i]$};  
                                      \path[draw] (-5,3)   node [left] {$S$}
         -- (-4,3) coordinate  (A) node [below left] {$i$} 
         -- (4, 3) coordinate (E) node [below] {$i+x+1$}
         -- (5, 3) 
;
\draw (2,3) node {$\bigotimes$};
\draw (2,0) node {$\bigotimes$};
\draw (2,-3) node {$\diamondsuit$};

\draw (0,3) node {$\diamondsuit$};
\draw (0,0) node {$\bigotimes$};
\draw (0,-3) node {$\diamondsuit$};

\draw (4.5,3) node {$\bigodot$};
\draw (4.5,0) node {$\bigotimes$};
\draw (4.5,-3) node {$\diamondsuit$};
\end{tikzpicture}

\end{minipage}
\hspace{0.5cm}

\begin{minipage}[p]{0.5\linewidth}
\begin{tikzpicture}[scale=0.5]


\draw[|<->|,
      >          = latex,
      line width = .3pt] (-4,3.5)--
                         (3.5,3.5)node[midway,
                                      above]{\it $x$};  
\draw[|<->|,
      >          = latex,
      line width = .3pt] (-6,3)--
                         (-6,7.7)node[midway,
                                      left]{\it $A[i]$};  
                                      
                                      \path[draw] (-5,3)   node [left] {$S$}
         -- (-4,3) coordinate  (A) node [below left] {$i$} 
         -- (4, 3) coordinate (E) node [below] {$i+x+1$}
         -- (5, 3) 
;

\draw (2,3) node {$\bigotimes$};
\draw (2,0) node {$\bigotimes$};
\draw (2,-3) node {$\diamondsuit$};

\draw (0,3) node {$\diamondsuit$};
\draw (0,0) node {$\bigotimes$};
\draw (0,-3) node {$\diamondsuit$};

\draw (4.5,3) node {$\bigodot$};
\draw (4.5,0) node {$\bigotimes$};
\draw (4.5,-3) node {$\diamondsuit$};
\end{tikzpicture}


\end{minipage}
	\hspace{0.5cm}

\begin{minipage}[p]{0.5\linewidth}
\caption{Here is my caption and jvnsdbvf dbfjba djfbdbf asdjfbhjf as dfhasd sdf bsdfsd fhjsvdhf sdfsdf fsd fhv ef ehjfzwef uwebfzhef sdvfzuweh fzef bsd fgvw efrbwefzwebfb ezbfhwef ev fzuwe vbfrzg bwezuifbhwe vbfhwe fwehjv fzh wevbfr bwehjfbhwebf hweb } \label{fig:pp}

\end{minipage}



\end{figure}
\end{document}
So what I would like to do is to put the caption in the place where the 4th figure should go.


so :

Fig1 Fig2
Fig3 Capt

Thank you

baxy
Last edited by localghost on Sun Dec 09, 2012 8:00 pm, edited 1 time 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.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Arrangement for Set of Figures with Caption

Post by localghost »

It would have been nice if you reduced the problem to a minimal example. So it would be a little bit easier to recognize the problem without having to dig through masses of code that is not necessary to reproduce it.

If I understand you right, the below code should produce a mockup of what you are looking for. The output is attached.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mwe}   % loads »blindtext« and »graphicx«

\begin{document}
  \begin{figure}[!ht]
    \begin{minipage}[b]{0.475\textwidth}
      \includegraphics[width=\linewidth]{example-image-a}
    \end{minipage}
    \hfill
    \begin{minipage}[b]{0.475\textwidth}
      \includegraphics[width=\linewidth]{example-image-b}
    \end{minipage}
    \par\bigskip
    \begin{minipage}[b]{0.475\textwidth}
      \includegraphics[width=\linewidth]{example-image-c}
    \end{minipage}
    \hfill
    \begin{minipage}[b]{0.475\textwidth}
      \caption{The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.}
    \end{minipage}
  \end{figure}
\end{document}
Note that the mwe package is used here to make the sample images available on the system. It should be part of the common TeX distributions. But it is not part of the solution.


Best regards and welcome to the board
Thorsten
Attachments
The obtained output.
The obtained output.
tmp.png (13.01 KiB) Viewed 2219 times
Post Reply