Graphics, Figures & TablesFigure Text Formatting

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
odytsh333
Posts: 1
Joined: Fri Apr 04, 2014 8:15 am

Figure Text Formatting

Post by odytsh333 »

Hey, I'm new to LaTeX but please bear with me. This has been frustrating me to no end.

I am trying to use a series of figures with some explanations and when I use the following code:

Code: Select all

\noindent 6. \\
\indent (A) $b = $ \space 1 (black) , 2 (blue) , 3 (red):
\vspace{-22mm}
\begin{figure}[h]
    \includegraphics[scale = .35]{fig1}  \includegraphics[scale = .35]{fig2}
    \vspace{-22mm}
    \caption{ (A): Impulse Response (left) and Step Response (right) }
\end{figure} \\

\indent (B) $b = $ \space 1 (black) , 2 (blue) , 3 (red):
\vspace{-22mm}
\begin{figure}[h]
    \includegraphics[scale = .35]{fig3}  \includegraphics[scale = .35]{fig4}
    \vspace{-22mm}
    \caption{ (B): Impulse Response (left) and Step Response (right) }
\end{figure} \\

\indent (C) $ \zeta = $ \space 0.2 (black) , 0.5 (blue) , 0.707 (red): \\ %%%%%%%%%%%%%%%%%%%
\vspace{-22mm}\\
\begin{figure}[h]
	\includegraphics[scale = .35]{fig5} \includegraphics[scale = .35]{fig6}
	\vspace{-22mm}
	\caption{ (C): Impulse Response (left) and Step Responce (right) }
\end{figure} \\

\indent (D) $ \zeta = $ \space 0.2 (black) , 0.5 (blue) , 0.707 (red): \\ %%%%%%%%%%%%%%%%%%%
\vspace{-22mm}\\
\begin{figure}[h]
	\includegraphics[scale = .35]{fig7} \includegraphics[scale = .35]{fig8}
	\vspace{-22mm}
	\caption{ (D): Impulse Response (left) and Step Responce (right) }
\end{figure} \\
I end up with the first two figures being formatted correctly, then the two lines that I put %'s next to end up going up the page into the (B) figure. No idea why this is happening and I've been trying for quite a long time to try to fix it. Please help.

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Figure Text Formatting

Post by Johannes_B »

Hi, looks like you want to have multiple figures with subcaptions. There are several packages out there helping you with that, namely subcaption and subfig. Have a look at their documentation.

As a beginner, best practice would be to read an introduction. This is a valuable investment, since you can evaluate code found somewhere on the internet. And are much faster once you got the grips. Right now, you code is not even hard to read, i feel shivers down my back.

By the way, when trying to get somebody to know a problem, a minimal working example is the way to go. This is the best basis to test a solution.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply