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

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

Uneven spacing in multi charts in a Single Chart

Postby hkarun » Tue Jun 05, 2018 3:27 pm

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 :
  1. \begin{figure}
  2. \begin{subfigure}{\textwidth}
  3. \includegraphics[width=0.40\linewidth]{Fig4corr1.pdf}
  4. \end{subfigure}%
  5. \begin{subfigure}{\textwidth}
  6. \includegraphics[width=0.40\linewidth]{Fig4corr2.pdf}
  7. \end{subfigure}
  8. \begin{subfigure}{\textwidth}
  9. \includegraphics[width=0.40\linewidth]{Fig4corr3.pdf}
  10. \end{subfigure}%
  11. \begin{subfigure}{\textwidth}
  12. \includegraphics[width=0.40\linewidth]{Fig4corr4.pdf}
  13. \end{subfigure}%
  14. \begin{subfigure}{\textwidth}
  15. \includegraphics[width=0.40\linewidth]{Fig4corr5.pdf}
  16. \end{subfigure}%
  17. \begin{subfigure}{\textwidth}
  18. \includegraphics[width=0.40\linewidth]{Fig4corr6.pdf}
  19. \end{subfigure}%
  20. \caption{Correlation Matrices of the variables}
  21. \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 ("***", "**", "*", ".", " ")
  22. \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 237 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 05, 2018 4:27 pm

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
Site admin

hkarun
Posts: 2
Joined: Tue Jun 05, 2018 3:10 pm

Postby hkarun » Tue Jun 12, 2018 3:27 pm

I used subfigure package

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 12, 2018 4:14 pm

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
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests