1

I am trying to arrange several figures e.g. as follows:

enter image description here

Those are .tikz files, and I am using \input to insert them.

What I am trying right now is this:

\begin{figure}[p]
        \centering  
    \begin{minipage}[t]{0.49\linewidth}
        \centering
        \input{Figures/Versuche/Temperatur_Messprogramm_Messreihe_1.tikz}
        \caption{Temperatur Messprogramm Messreihe 1}
        \label{Temperatur_Messprogramm_Messreihe_1}
    \end{minipage}
    \begin{minipage}[t]{0.49\linewidth}
        \centering
        \input{Figures/Versuche/Temperatur_Messprogramm_Messreihe_2.tikz}
        \caption{Temperatur Messprogramm Messreihe 2}
        \label{Temperatur_Messprogramm_Messreihe_2}
    \end{minipage}
    \begin{minipage}[t]{1.00\linewidth}
        \centering
        \input{Figures/Versuche/Temperatur_Messprogramm_Messreihe_3.tikz}
        \caption{Temperatur Messprogramm Messreihe 3}
        \label{Temperatur_Messprogramm_Messreihe_3}
    \end{minipage}
\label{Temperaturmessprogramm}
\end{figure}

This seems to work it would be \includegraphics[width=1.0\linewidth] instead of \input. \input however does not accept the [width=1.0\linewidth] bit.

Can someone help me out?

epR8GaYuh
  • 2,432
Timon
  • 127
  • 1
    You could have a look at the tikzscale package: https://tex.stackexchange.com/questions/155314/scale-tikz-figure-to-a-percentage-of-textwidth/155317#155317 – Torbjørn T. Jul 27 '20 at 15:26
  • How can I do \includegraphics[width=3cm,height=2cm]{smallfigure2} for \input? Basically an \input[width=3cm,height=2cm]{smallfigure2}. – Timon Jul 27 '20 at 15:30
  • See the link in my comment. (I copied the wrong link first, sorry, so I edited the comment.) \input just inserts the text in the specified file, but with tikzscale you can use \includegraphics with .tikz files. – Torbjørn T. Jul 27 '20 at 15:32
  • 1
    As a last measure you can use \resizebox, also demonstrated in the answer I linked to. That will also change the size of the text, so in general I'd avoid it. – Torbjørn T. Jul 27 '20 at 15:34
  • This worked. Thank you so much! This text does rescale though. This might be because the .tikz has been created by matlab2tikz automatically. – Timon Jul 27 '20 at 16:04
  • 1
    You can set the (approximate) width when you run matlab2tikz, then you don't have to scale later. – Torbjørn T. Jul 27 '20 at 16:05
  • \input is just the same as copying the contents of the file at that point it does not create a tex box that can be scaled or have any properties at all – David Carlisle Jul 27 '20 at 19:51
  • 1
    Just did a quick test: seems you need to remove any scaling options from the axis options. I.e. in smallfigure2.tikz, remove all of scale only axis, width=<length>, height=<length>, axis equal if present. – Torbjørn T. Jul 27 '20 at 22:24

0 Answers0