TransWikia.com

Subfigures in triangle with the subfigure package

TeX - LaTeX Asked by GoldenFlecha on December 3, 2020

I am trying to get three images as subfigures in this shape:

enter image description here

I want to do it with the package subfigures bacause the rest of my document is with that package and it seems to be incompatible with the package subcaption. I’ve seen several related questions (as this one), but what I need to use is the subfigure package (not subfig and not subcaption).

Everything I’ve tried so far is not even compiling.

One Answer

With subfigure

enter image description here

documentclass{article}
usepackage[margin=0.5in]{geometry}
usepackage[utf8]{inputenc}
usepackage{textcomp}
usepackage{pgfplots}
usepackage{subcaption}

begin{document}


    begin{figure}[ht]

        begin{subfigure}{.5textwidth} % this sets the figure to be max half the width of the page
            centering
            % include first image
            includegraphics[width=.9linewidth]{example-image-b}  % this sets the image to fill 90% of the available space -> 45% of the line width in total. 
            caption{Put your sub-captionB here}
            label{fig:sub-first}
        end{subfigure}
        begin{subfigure}{.5textwidth}
            centering
            % include second image
            includegraphics[width=.9linewidth]{example-image-c}  
            caption{Put your sub-captionC here}
            label{fig:sub-second}
        end{subfigure}

        label{fig:fig}
        begin{subfigure}{textwidth}
            centering
            % include first image
            includegraphics[width=.45linewidth]{example-image-a}   % this width should be half of the width of the other two images
            caption{Put your sub-captionA here}
            label{fig:sub-firstA}
        end{subfigure}
        caption{Put your caption here}
    end{figure}

end{document}

With subfig/subfloat

enter image description here

documentclass{article}
usepackage{subfig}
usepackage[demo]{graphicx}
begin{document}

begin{figure}[ht]%
 centering
 subfloat[]{includegraphics{UEB01-repograph1.pdf}label{fig:a}} quad
 subfloat[]{includegraphics{UEB01-repograph2.pdf}label{fig:b}}
 subfloat[]{includegraphics{UEB01-repograph3.pdf}label{fig:c}}%
 caption{Some caption}%
 label{some-label}%
end{figure}

end{document}

EDIT1

Adding placement with array

enter image description here

documentclass{article}
usepackage{subfig}
usepackage[demo]{graphicx}
begin{document}

begin{figure}[ht]%
 centering
 subfloat[]{includegraphics{UEB01-repograph1.pdf}label{fig:a}} quad
 subfloat[]{includegraphics{UEB01-repograph2.pdf}label{fig:b}}
 subfloat[]{includegraphics{UEB01-repograph3.pdf}label{fig:c}}%
 caption{Some caption}%
 label{some-label}%
end{figure}
begin{figure*}[t!]
$begin{array}{cc}
    includegraphics[width=0.5textwidth]{FIGURE_1.pdf} &
    includegraphics[width=0.5textwidth]{FIGURE_2.pdf}
    textbf{fjhfj}& textbf{fjhfj}
    multicolumn{2}{c}{includegraphics[width=0.5textwidth]{FIGURE_3.pdf}}
    multicolumn{2}{c}{textbf{fjhfj}}
end{array}$
caption[My beautiful figure.]{label{fig:label}My beautiful figure}
end{figure*}
end{document}

With minipage

enter image description here

documentclass{article}
usepackage{graphicx,subcaption}

begin{document}

begin{figure}[htp]
centering

begin{minipage}[b]{0.58textwidth} % almost 60%
begin{subfigure}{0.49textwidth}
includegraphics[width=textwidth]{example-image-a}

caption{Mystery shack}
end{subfigure}%
hfill
begin{subfigure}{0.49textwidth}
includegraphics[width=textwidth]{example-image-b}

caption{Nice landscape}
end{subfigure}


end{minipage} par 
begin{minipage}[b]{0.38textwidth} % almost 40%
includegraphics[width=textwidth]{example-image}

caption{Rainbow gnome}
end{minipage}%
caption{Gravity falls}
end{figure}

end{document}

Answered by js bibra on December 3, 2020

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