2
votes

This latex code:

\begin{figure}[H]
 \setlength{\figW}{5cm} % determines the width of the images
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigw_kegel_0.5.tex}
           \caption{}
      \end{subfigure}
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigw_kegel_0.05.tex}
           \caption{}
      \end{subfigure} \\
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigv_norm_kegel_0.5.tex}
           \caption{}
      \end{subfigure}
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigv_norm_kegel_0.05.tex}
           \caption{}
      \end{subfigure}
  \caption{(a) and (b): $\lambda_1(\VM{\omega})$ and 
  $\lambda_2(\VM{\omega})$ with $\omega_1 = 0.5$ (left) and $\omega_1 = 
  0.05$ (right), (c) and (d): norm of $\pderiv{\VM{x}_1(\VM{\omega})} 
   {\omega_2}$  with $\omega_1= 0.5$ (left) and $\omega_1= 0.05$ (right)}
  \end{figure}

gives me the following output:

I would like to have the following output (made it using paint). How to adapt the latex-code so that I get this result?

enter image description here

1
The images have different resolution - the bottom panel most likely is "longer" due to the ylabel string in both of the subplots and this most likely makes it impossible for LaTex to adjust them correctly. I would suggest either removing the ylabel string from bottom plots or adding ylabel string to the upper ones.msi_gerva

1 Answers

2
votes

I fixed this issue myself. You just need to add \hspace{0.8cm} to move the figures to the right.

\begin{figure}[H]
 \setlength{\figW}{5cm} % determines the width of the images
      \begin{subfigure}[b]{0.5\textwidth}
           \hspace{0.8cm}
           \input{images/eigw_kegel_0.5.tex}
           \caption{}
      \end{subfigure}
      \begin{subfigure}[b]{0.5\textwidth}
           \hspace{0.7cm}
           \input{images/eigw_kegel_0.05.tex}
           \caption{}
      \end{subfigure} \\
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigv_norm_kegel_0.5.tex}
           \caption{}
      \end{subfigure}
      \begin{subfigure}[b]{0.5\textwidth}
           \input{images/eigv_norm_kegel_0.05.tex}
           \caption{}
      \end{subfigure}
  \caption{(a) and (b): $\lambda_1(\VM{\omega})$ and 
  $\lambda_2(\VM{\omega})$ with $\omega_1 = 0.5$ (left) and $\omega_1 = 
  0.05$ (right), (c) and (d): norm of $\pderiv{\VM{x}_1(\VM{\omega})} 
   {\omega_2}$  with $\omega_1= 0.5$ (left) and $\omega_1= 0.05$ (right)}
  \end{figure}