Graphics, Figures & TablesUneven spacing in multi charts in a Single Chart

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
hkarun
Posts: 2
Joined: Tue Jun 05, 2018 3:10 pm

Uneven spacing in multi charts in a Single Chart

Post by hkarun »

Dear All,
I am new to Latex and trying to build an article in it. I intend to put multiple charts (6 in one single page). I wrote the following code :

Code: Select all

\begin{figure}
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr1.pdf}
 	\end{subfigure}%
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr2.pdf}
 	\end{subfigure}		
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr3.pdf}
 	\end{subfigure}%
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr4.pdf}
 	\end{subfigure}%
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr5.pdf}
 	\end{subfigure}%
 	\begin{subfigure}{\textwidth} 
 		\includegraphics[width=0.40\linewidth]{Fig4corr6.pdf}
 	\end{subfigure}%
  	\caption{Correlation Matrices of the variables}
 	\footnotesize Notes on Graphs in Figure 4: The distribution of each variable is shown on the diagonal. On the bottom of the diagonal: the bivariate scatter plots with a fitted line are displayed.  On the top of the diagonal: the value of the correlation plus the significance level as stars. Each significance level is associated to a symbol: p-values (0, 0.001, 0.01, 0.05, 0.1, 1) <=> symbols ("***", "**", "*", ".", " ")
 \end{figure}
The output of this code comes like as shown in the image . Can any of you please guide me how to fix this problem please? I will be grateful for any suggestions on it. Thanks
Attachments
outcome.PNG
outcome.PNG (79.5 KiB) Viewed 2795 times

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

Stefan Kottwitz
Site Admin
Posts: 10328
Joined: Mon Mar 10, 2008 9:44 pm

Uneven spacing in multi charts in a Single Chart

Post by Stefan Kottwitz »

Hi,

welcome to the forum!

Perhaps you use the wrong syntax - but it depends which package you are using: subfigure, subfig, or subcaption. Which one is it?

Stefan
LaTeX.org admin
hkarun
Posts: 2
Joined: Tue Jun 05, 2018 3:10 pm

Uneven spacing in multi charts in a Single Chart

Post by hkarun »

I used subfigure package
User avatar
Stefan Kottwitz
Site Admin
Posts: 10328
Joined: Mon Mar 10, 2008 9:44 pm

Uneven spacing in multi charts in a Single Chart

Post by Stefan Kottwitz »

In that case it's the wrong syntax. The package provides the command \subfigure, but you wrote \begin{subfigure} ... \end{subfigure}.

The syntax (see subfigure manual) is

\subfigure[list entry][subcaption]{figure}

It seems that you use the syntax of subcaption. Perhaps remove \usepackage{subfigure} and add \usepackage{subcaption}, or fix the syntax.

Stefan
LaTeX.org admin
Post Reply