0

enter image description here

I wanted to do 3x3 subplots with their colour bar shown north side, I want to write a code that puts them together as 3x3 subplots in Latex and then, I need to place thier colorbar at the north side. I posted a similar question before but the answer was for subplots that are all generated in matlab while what I need is to do 9 .eps files with one colorbar placed northside.

UPDATE: here I added an image of what I want, also I want to have the labels where the zero is and another 3 labels on top; one label for each ( directly below the colorbar).

any help will be greatly appreciated

  • 1
    Welcome to TeX.SX. A minimal example of what you have or what you have tried would be welcome. In case you don't have that… well, an image of what you want to achieve would also be welcome. In any case, more info and more effort on your side, would be appreciated. – Manuel Nov 2 '14 at 13:14
  • I put the image, any help now? – Naema Nov 2 '14 at 18:36
  • More I read your question and more I think I didn't answer your real needs. :( – RicoRally Nov 8 '14 at 12:41
2

Instead, if you want this result:

tabular includegraphics figure rotating

The code is the following, with the same recommandations of the previous one:

\documentclass{article}

\usepackage{adjustbox}
\usepackage{booktabs,rotating,bigstrut}

\begin{document}

\begin{center}
    \begin{tabular}{cccc}
        &\multicolumn{3}{c}{\adjustimage{width=.94\textwidth}{}}\\
        &\begin{adjustbox}{max width=.28\textwidth}
            my caption 1 [NW]
        \end{adjustbox}&
        \begin{adjustbox}{max width=.28\textwidth}
            my caption 2 [NN]
        \end{adjustbox}&
        \begin{adjustbox}{max width=.28\textwidth}
            my caption 3 [NE]
        \end{adjustbox}\\
        \begin{sideways}my sideways 1\end{sideways}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}\\
        \begin{sideways}my sideways 2\end{sideways}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}\\
        \begin{sideways}my sideways 3\end{sideways}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}&
        \adjustimage{width=.29\textwidth}{}\\
    \end{tabular}
\end{center}

\end{document}
  • thanks RicoRally, this looks exactly what I want, many thanks! – Naema Nov 10 '14 at 16:35
  • RicoRally, I had to download a missing package from CTAN. The package "adjustbox" but then when I ran the adjustbox.tex file, I had an error about the first line in this file.The error was:! I can't find file `ydocstrip.tex. So, I still did not get your example to work with me because I am missing a package! – Naema Nov 10 '14 at 16:56
  • This happens when you fail the procedure to install the package. Package files' extension is .sty, not .tex. But don't worry, if you tell me the distribution you use, i'll be glad to help you. :) are you using MikTeX 2.9? Maybe you can ask a question on that and write here the link. Otherwise you can check this question: tex.stackexchange.com/questions/196555/… – RicoRally Nov 10 '14 at 19:15
1

I'm not sure I understood your question, but I think you are looking for something like this:

image tabular includegraphics figure

That can be achieved with a simple usage of the environment tabular like this:

\documentclass{article}

\usepackage{adjustbox}
\usepackage{booktabs}

\begin{document}

\begin{figure}[h]
\begin{center}
    \begin{tabular}{ccc}
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 1 [NW]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 2 [NN]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 3 [NE]
    \end{adjustbox}\\
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \end{tabular}

    \bigskip

    \begin{tabular}{ccc}
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 4 [WW]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 5 [CC]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 6 [EE]
    \end{adjustbox}\\
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \end{tabular}

    \bigskip

    \begin{tabular}{ccc}
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 7 [SW]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 8 [SS]
    \end{adjustbox}&
    \begin{adjustbox}{max width=.29\textwidth}
        my caption 9 [SE]
    \end{adjustbox}\\
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}&
    \adjustimage{width=.29\textwidth}{}\\
    \end{tabular}
\end{center}
\end{figure}

\end{document}

Be aware that this example won't work on his own, the empty brackets {} (arguments of \adjustimage) need just to be filled with your image files.

I let the packages adjustbox and booktabs help me for a better graphical rendering. But that's not strictly necessary. For these cases, the concept is: "use just a well placed tabular!", and that will save you time. I prefer this approach rather than "bothering" myself with floats and automatic layout, because I want to be sure of the output in advance. Anyway nothing impedes you of putting your tabulars or center environments inside a figure environment, if that pleases you.

  • 1
    Doesn't any \bigskip risk to make the following tables properly skip to next page, if there's no vertical space enough? Or am I wrong since it's all inside center? – MattAllegro Nov 8 '14 at 12:55
  • 1
    You're not wrong. To avoid that we could make use of a figure environment. I'm just editing because you never know... – RicoRally Nov 8 '14 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.