TransWikia.com

Reducing size of Subfigure

TeX - LaTeX Asked by SaySadi on August 15, 2021

I have four sub figures put together (two by two) but I would like to make the top two subfigures smaller. How do I go up about doing this? This is what my current code looks like (see below) and my figures are pdfs that were cropped outside of LaTeX. I thought maybe trim might be the way to go but I’m not sure. Thank you in advance

begin{figure}
     centering
     begin{subfigure}[t]{0.48textwidth}
         centering
         includegraphics[width=textwidth]{Alpha 25 -1.6 Cropped.pdf}
         label{fig:Alpha}
     end{subfigure}
     quad
     %hfill
     begin{subfigure}[t]{0.48textwidth}
         centering
         includegraphics[width=textwidth]{V 25 -1.6 Cropped.pdf}
         label{fig:Forward Speed}
     end{subfigure} 
    begin{subfigure}[t]{0.48textwidth}
         centering
         includegraphics[width=textwidth]{Pitch Angle 25 -1.6.pdf}
         label{fig:theta}
     end{subfigure}
     %hfill
     quad
    begin{subfigure}[t]{0.48textwidth}
         centering
         includegraphics[width=textwidth]{Pitch Rate 25 -1.6.pdf}
         label{fig:q}
     end{subfigure}
    caption{$alpha$, V, $theta$ and $q$ bifurcation diagrams.}
    label{fig:25 -1.6} 
end{figure}

2 Answers

The size of the figures can be controlled by the subfigure argument.

Being the normal size of them equal to textwidth, writing begin{subfigure}[t]{0.30textwidth} will scale them to 0.3 of their original width. To center them insert a hspace equal to half of the remaining space (0.4textwidth in this case).

You need to have keepaspectratio in the includegraphics to ... well, to keep the aspect ratio of the imported images while being expanded to textwidth.

a

documentclass[12pt,a4paper]{article}

usepackage{subcaption} %  added <<<<<<<<<<<<<<<<

usepackage{graphicx}

begin{document}    
    
begin{figure}
    centering
    begin{subfigure}[t]{0.3textwidth}
        centering
        includegraphics[width=textwidth, keepaspectratio]{example-image-a}
        label{fig:Alpha}
    end{subfigure}
%   quad
    hspace*{.20textwidth} % half of the free horizontal space
%   hfill
    begin{subfigure}[t]{0.3textwidth}
        centering
        includegraphics[width=textwidth, keepaspectratio]{example-image-a}
        label{fig:Forward Speed}
    end{subfigure} 
    begin{subfigure}[t]{0.48textwidth}
        centering
        includegraphics[width=textwidth, keepaspectratio]{example-image-b}
        label{fig:theta}
    end{subfigure}
    hspace{0.02textwidth}
    begin{subfigure}[t]{0.48textwidth}
        centering
        includegraphics[width=textwidth,  keepaspectratio]{example-image-b}
        label{fig:q}
    end{subfigure}
    caption{$alpha$, V, $theta$ and $q$ bifurcation diagrams.}
    label{fig:25 -1.6} 
end{figure}
    
end{document}

Reduced to 0.1textwidth. No problem with [t] apparent.

b

Answered by Simon Dispa on August 15, 2021

  • labeling of subfigures hasn't sense since you not have captions for them
  • sub-images can be simple arrangement by use of tabular:
documentclass[12pt,a4paper]{article}
usepackage{graphicx}

begin{document}

begin{figure}
    centering
    begin{tabular}{cc}
includegraphics[width=0.2linewidth]{example-image-a}
    &   includegraphics[width=0.2linewidth]{example-image-a}
        
includegraphics[width=0.4linewidth]{example-image-b}
    &   includegraphics[width=0.4linewidth]{example-image-b}
     end{tabular}
caption{$alpha$, V, $theta$ and $q$ bifurcation diagrams.}
label{fig:25 -1.6}
end{figure}

end{document}

enter image description here

Answered by Zarko on August 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP