I want to align subplots in a pgfplot.
with \matrix
it is easy to align pictures. My problem is, that I need several rows with two columns/pictures and a last row with a picture over both columns.
Here the not working code illustrating what I wanted to do
\documentclass[a4paper,oneside,10pt]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[USenglish]{babel}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=newest}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{figure} [H]
\centering
\begin{tikzpicture}
\matrix{
\begin{axis}[width=0.45\textwidth,height=0.45\textwidth]
\addplot {x};
\end{axis}
&
\begin{axis}[width=0.45\textwidth,height=0.45\textwidth]
\addplot {x};
\end{axis}
\\
\begin{axis}[width=0.9\textwidth,height=0.45\textwidth]
\addplot {x};
\end{axis}
\\
};
\end{tikzpicture}
\end{figure}
\end{document}
that's the unwanted result
and that's how I wanted it to look
I had a look at
- Manual for Package pgfplots by Christian Feuersaenger
- TikZ & PGF Manual by Till Tantau
but did not found a solution (maybe there is non)
Does anybody has a solution for doing it with /matrix (highly appreciated) or maybe another solution?
kind regards Benjamin