LaTeX forum ⇒ Graphics, Figures & TablesArrangement for Set of Figures with Caption

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

Arrangement for Set of Figures with Caption

Postby baxy » Sun Dec 09, 2012 7:36 pm

Hello,

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

  1. \documentclass{article}
  2. \usepackage{graphics,eurosym,latexsym}
  3. \usepackage{times}
  4. \usepackage{listings}
  5. \usepackage{mathtools}
  6. \lstset{columns=fixed,basicstyle=\ttfamily,numbers=left,numberstyle=\tiny,stepnumber=5,breaklines=true}
  7. \bibliographystyle{plain}
  8. \oddsidemargin=0cm
  9. \evensidemargin=0cm
  10. \usepackage{pst-all}
  11. \usepackage{enumerate}
  12. \newcommand{\be}{\begin{enumerate}}
  13. \newcommand{\ee}{\end{enumerate}}
  14. \newcommand{\bi}{\begin{itemize}}
  15. \newcommand{\ei}{\end{itemize}}
  16. \newcommand{\I}{\item}
  17. \newcommand{\ty}{\texttt}
  18. \textwidth=16cm
  19. \textheight=22cm
  20.  
  21. \usepackage{tikz}
  22. \usetikzlibrary{shapes,arrows,chains}
  23. \usepackage{pgfplots}
  24. \usepackage{verbatim}
  25. \usetikzlibrary{calc}
  26.  
  27. \usepackage{amsthm}
  28.  
  29. \newtheorem{defn}{Definition}
  30. \newtheorem{fac}{Fact}
  31. \newtheorem{thm}{Theorem}
  32. \newtheorem{problem}{Problem}
  33. \newtheorem{lem}{Lemma}
  34. \newtheorem{mdl}{Model}
  35. \newtheorem{condition}{Condition}
  36. \newtheorem{fc}{Fact}
  37. \usepackage{latexsym}
  38. \usepackage{algorithm}
  39. \usepackage{algorithmic}
  40. \usepackage{qtree}
  41. \usepackage{graphicx}
  42. \usepackage{epsf}
  43. \usepackage{multirow}
  44.  
  45. \usepackage{enumitem}
  46. \usepackage{xcolor}
  47. \usepackage{amsfonts}
  48.  
  49. \newlength{\mylen}
  50. \addtolength{\mylen}{\baselineskip}
  51. \addtolength{\mylen}{8pt}
  52. \newcommand\myvspace{\rule{0pt}{1pt}\vspace*{-\mylen}}
  53.  
  54.  
  55. \begin{document}
  56.  
  57. \begin{figure}
  58. \begin{minipage}[p]{0.5\linewidth}
  59. \begin{tikzpicture}[scale=0.5]
  60.  
  61. \draw[|<->|,
  62. > = latex,
  63. line width = .3pt] (-6,3)--
  64. (-6,7.7)node[midway,
  65. left]{\it $A[i]$};
  66. \draw[|<->|,
  67. > = latex,
  68. line width = .3pt] (-4,3.5)--
  69. (3.5,3.5)node[midway,
  70. above]{\it $x$};
  71. \path[draw] (-5,3) node [left] {$S$}
  72. -- (-4,3) coordinate (A) node [below left] {$i$}
  73. -- (4, 3) coordinate (E) node [below] {$i+x+1$}
  74. -- (5, 3)
  75. ;
  76. \draw (2,3) node {$\bigotimes$};
  77. \draw (2,0) node {$\bigotimes$};
  78. \draw (2,-3) node {$\diamondsuit$};
  79.  
  80. \draw (0,3) node {$\diamondsuit$};
  81. \draw (0,0) node {$\bigotimes$};
  82. \draw (0,-3) node {$\diamondsuit$};
  83.  
  84. \draw (4.5,3) node {$\bigodot$};
  85. \draw (4.5,0) node {$\bigotimes$};
  86. \draw (4.5,-3) node {$\diamondsuit$};
  87. \end{tikzpicture}
  88.  
  89.  
  90. \end{minipage}
  91. \hspace{0.5cm}
  92.  
  93. \begin{minipage}[p]{0.5\linewidth}
  94. \begin{tikzpicture}[scale=0.5]
  95.  
  96. \draw[|<->|,
  97. > = latex,
  98. line width = .3pt] (-4,3.5)--
  99. (3.5,3.5)node[midway,
  100. above]{\it $x$};
  101. \draw[|<->|,
  102. > = latex,
  103. line width = .3pt] (-6,3)--
  104. (-6,7.7)node[midway,
  105. left]{\it $A[i]$};
  106. \path[draw] (-5,3) node [left] {$S$}
  107. -- (-4,3) coordinate (A) node [below left] {$i$}
  108. -- (4, 3) coordinate (E) node [below] {$i+x+1$}
  109. -- (5, 3)
  110. ;
  111. \draw (2,3) node {$\bigotimes$};
  112. \draw (2,0) node {$\bigotimes$};
  113. \draw (2,-3) node {$\diamondsuit$};
  114.  
  115. \draw (0,3) node {$\diamondsuit$};
  116. \draw (0,0) node {$\bigotimes$};
  117. \draw (0,-3) node {$\diamondsuit$};
  118.  
  119. \draw (4.5,3) node {$\bigodot$};
  120. \draw (4.5,0) node {$\bigotimes$};
  121. \draw (4.5,-3) node {$\diamondsuit$};
  122. \end{tikzpicture}
  123.  
  124. \end{minipage}
  125. \hspace{0.5cm}
  126.  
  127. \begin{minipage}[p]{0.5\linewidth}
  128. \begin{tikzpicture}[scale=0.5]
  129.  
  130.  
  131. \draw[|<->|,
  132. > = latex,
  133. line width = .3pt] (-4,3.5)--
  134. (3.5,3.5)node[midway,
  135. above]{\it $x$};
  136. \draw[|<->|,
  137. > = latex,
  138. line width = .3pt] (-6,3)--
  139. (-6,7.7)node[midway,
  140. left]{\it $A[i]$};
  141.  
  142. \path[draw] (-5,3) node [left] {$S$}
  143. -- (-4,3) coordinate (A) node [below left] {$i$}
  144. -- (4, 3) coordinate (E) node [below] {$i+x+1$}
  145. -- (5, 3)
  146. ;
  147.  
  148. \draw (2,3) node {$\bigotimes$};
  149. \draw (2,0) node {$\bigotimes$};
  150. \draw (2,-3) node {$\diamondsuit$};
  151.  
  152. \draw (0,3) node {$\diamondsuit$};
  153. \draw (0,0) node {$\bigotimes$};
  154. \draw (0,-3) node {$\diamondsuit$};
  155.  
  156. \draw (4.5,3) node {$\bigodot$};
  157. \draw (4.5,0) node {$\bigotimes$};
  158. \draw (4.5,-3) node {$\diamondsuit$};
  159. \end{tikzpicture}
  160.  
  161.  
  162. \end{minipage}
  163. \hspace{0.5cm}
  164.  
  165. \begin{minipage}[p]{0.5\linewidth}
  166. \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}
  167.  
  168. \end{minipage}
  169.  
  170.  
  171.  
  172. \end{figure}
  173. \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.
Reason: Longer passages of source code are tagged as code block, not as in-line code.

Tags:

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Dec 09, 2012 8:27 pm

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.
  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{mwe} % loads »blindtext« and »graphicx«
  4.  
  5. \begin{document}
  6. \begin{figure}[!ht]
  7. \begin{minipage}[b]{0.475\textwidth}
  8. \includegraphics[width=\linewidth]{example-image-a}
  9. \end{minipage}
  10. \hfill
  11. \begin{minipage}[b]{0.475\textwidth}
  12. \includegraphics[width=\linewidth]{example-image-b}
  13. \end{minipage}
  14. \par\bigskip
  15. \begin{minipage}[b]{0.475\textwidth}
  16. \includegraphics[width=\linewidth]{example-image-c}
  17. \end{minipage}
  18. \hfill
  19. \begin{minipage}[b]{0.475\textwidth}
  20. \caption{The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.}
  21. \end{minipage}
  22. \end{figure}
  23. \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
tmp.png
The obtained output.
tmp.png (13.01 KiB) Viewed 1300 times
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests