Graphics, Figures & TablesCustom Alignment for Sub-figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Locked
lasi
Posts: 4
Joined: Sun Aug 12, 2012 12:46 pm

Custom Alignment for Sub-figures

Post by lasi »

Hi Guys!

I'm new to LaTeX and I'm searching solve a problem with figures alignment. I've searched on the net for an example or a solution but haven't found nothing.

I want to build a figure with a main picture and two small sub-pictures on the right, as in the attachment. The only solution that is similar to what I want to do is:

Code: Select all

\begin{figure}
\begin{tabular}{cc}
\includegraphics[width=0.6\textwidth]{S11_vs_gap_in.png} & 
\begin{tabular}{c}
\includegraphics[width=0.4\textwidth]{S11_frequency_vs_gap_in.png} \\
\includegraphics[width=0.4\textwidth]{S11_vs_Q.png}
\end{tabular}
\end{tabular}
\label{fig:gap_s11}
\end{figure}
But it doesn't solve my problem. I've tried also with the sub-figure option but I can't obtain what I want.

Could someone help me to solve this problem?


Thanks
lasi
Attachments
What I would like to do...
What I would like to do...
LATEX_FORUM_REQUEST.jpg (14.23 KiB) Viewed 11519 times
Last edited by Stefan Kottwitz on Sun Aug 12, 2012 1:44 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Custom Alignment for Sub-figures

Post by Stefan Kottwitz »

Hi lasi,

welcome to the board!

You could use the subcaption package, especially if you need captions for the sub pictures.
Otherwise one could use a tabular environment for arranging sub figures.

Stefan
LaTeX.org admin
lasi
Posts: 4
Joined: Sun Aug 12, 2012 12:46 pm

Re: Custom Alignment for Sub-figures

Post by lasi »

Thanks for your hint. I've tried also usin multirow and makecell but I'm still not able to do what i want. Using multirow the main picture is aligned vertically at the center instead of the top ruining everything and it's not possible change the vertical alignment for multirow....
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Alignment for Sub-figures

Post by localghost »

If you just would show your own efforts by providing a proper minimal example, we could avoid guesswork and offer concrete help instead. By then this discussion is academic and therefore will lead to nothing.


Best regards and welcome to the board
Thorsten
lasi
Posts: 4
Joined: Sun Aug 12, 2012 12:46 pm

Re: Custom Alignment for Sub-figures

Post by lasi »

Do you think that I have to consider this 1 month late comment as useful? :x
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Alignment for Sub-figures

Post by localghost »

lasi wrote:Do you think that I have to consider this 1 month late comment as useful? :x
I've been on a vacation for a while. So I discovered this thread only now. And if you expect constructive answers, you should consider it as an approach to retrieve useful information. No more, no less. Due to missing information this thread was orphaned for almost a month. If you are not interested any more in a solution to the problem, just let us know. Otherwise provide useful information in form of code to give us something we can test.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Custom Alignment for Sub-figures

Post by Stefan Kottwitz »

lasi, it's an explanation why you did not get another answer. And this general advice about posting questions should be useful today as well. If you don't understand it, perhaps your next question may remain unanswered too.

Question with a Infominimal working example, which can be tested, can usually be solved.

Stefan
LaTeX.org admin
lasi
Posts: 4
Joined: Sun Aug 12, 2012 12:46 pm

Re: Custom Alignment for Sub-figures

Post by lasi »

I'm glad that you have a great amount of free time, but I'm sorry that you waste it like this. Post closed :!: .
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Custom Alignment for Sub-figures

Post by Stefan Kottwitz »

Giving friendly advice to help seeking people is usually not wasted. Seems just in your case, that we wasted our time. No big problem though, it happens on the internet. So I close and lock the topic. To not let it appear as unsolved, and as the mentioned subcaption package provides a solution, I mark that post as the answer.

Stefan

edit: Thanks for the addition, Thorsten, I marked your answer as the solution.
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Alignment for Sub-figures

Post by localghost »

lasi wrote:I'm glad that you have a great amount of free time, but I'm sorry that you waste it like this. […]
Seemingly it is really a waste of time to try to help certain people. m(

But for all those who have the same or a similar problem and may come here by search engine I seize Stefan's suggestion which involves the subcaption package.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{caption}
\usepackage{subcaption}

\captionsetup{
  font=small,
  labelfont=bf,
  tableposition=top
}
\captionsetup[subfigure]{
  belowskip=1ex
}

\begin{document}
  \begin{figure}[!ht]
    \begin{subfigure}[b]{0.45\linewidth}
      \rule{\linewidth}{1.645\linewidth}
      \caption{First sub-figure}
      \label{subfig-1:dummy}
    \end{subfigure}
    \hfill
    \begin{minipage}[b]{0.45\linewidth}
      \begin{subfigure}[b]{\linewidth}
        \rule{\linewidth}{0.75\linewidth}
        \caption{Second sub-figure}
        \label{subfig-2:dummy}
      \end{subfigure}\\
      \begin{subfigure}[b]{\linewidth}
        \rule{\linewidth}{0.75\linewidth}
        \caption{Third sub-figure}
        \label{subfig-3:dummy}
      \end{subfigure}
    \end{minipage}
    \caption{Dummy figure}
    \label{fig:dummy}
  \end{figure}
\end{document}
This certainly needs some adjustments which depend on the use case.
Attachments
The resulting output.
The resulting output.
subcaption-custom-alignment.png (10.14 KiB) Viewed 11448 times
Locked