6

Can anybody tell me how to arrange 5 TikZ pictures like this? I am very sorry, but I have no idea how to.

enter image description here

I uploaded the Codes and the png file here

2 Answers 2

7

The scope environment of Tikz is well suited for such tasks, as it allows to shift and rotate everything it contains. My suggestion is to create one tikzpicture and then create a different scope for each axis you have. This leads to a setup like this:

\begin{tikzpicture}

    \begin{scope}
        \input{X}
    \end{scope}

    \begin{scope}[yshift=6cm]
        \input{G_1}
    \end{scope}

    \begin{scope}[yshift=8cm]
        \input{G_2}
    \end{scope}

    \begin{scope}[xshift=1cm,yshift=-0.8cm,rotate=90]
        \input{B_1}
    \end{scope}

    \begin{scope}[xshift=-2cm,yshift=-0.8cm,rotate=90]
        \input{B_2}
    \end{scope}

\end{tikzpicture}

Note: so far, every .tex file includes a \begin{tikzpicture} ... \end{tikzpicture}. For a solution like this here, you need to remove that, so only the axis stuff remains.

The result (shown below) might not be perfect, but by adjusting the shifts, you should be able to get a nice result.

result

0
4

You can simply use a tabular:

\documentclass{article}
\usepackage{pgfplots}
\usepackage{graphicx}

\begin{document}‎‎

\noindent
\begin{tabular}{@{}cccc@{}}
& &  \input{G_1} \\
& &  \input{G_2} \\
\rotatebox{90}{\input{B_1}} & \rotatebox{90}{\input{B_2}} & \input{X} \\
\end{tabular}

\end{document}

The result:

enter image description here

8
  • Thanks! The tikzpictures are too big. Is there an oppotiunity to include external tikz files into it?
    – N8_Coder
    Jul 29, 2015 at 22:18
  • @user2307200 That's a different issue, apparently. What exactly do you mean with the tikzpictures are too big? You can scale them down. Jul 29, 2015 at 22:20
  • 1
    Do you have your tikzpictures as standalone files? If so, you can use something like \includegraphics[width=1cm,height=0.8cm]{figure1} instead of \rule in my example (of course, \usepackage{graphicx} in the preamble). Jul 29, 2015 at 22:56
  • Thanks, that works! But I need to rotate two of my tikz file (these on the left) and that breaks the arrangement :/ I used "\begin{rotate}{90}..."
    – N8_Coder
    Jul 30, 2015 at 7:21
  • 1
    I found a solution using \hspace{20 mm} beteen the tikz-files. But now the vertical spaces are not equal and I do not want to use \vspace{20 mm}... There must be a better solution, is it?
    – N8_Coder
    Jul 30, 2015 at 7:32

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.