This is my first post, so I hope I do everything right :)
I have the following problem:
Using pgfplots I create two graphs next to each other which have identical y-axes, but different x-axes. I want the x-axes to be aligned, and the y-axes to be of the same height, but due to the different labels on the x-axes, the second graph is shifted down.
Is there a way to align the axes?
Here is my code:
\documentclass[crop,10pt]{standalone}
\usepackage[english]{babel}
\usepackage{pgfplots}
\begin{document}%
\fbox{
\begin{tikzpicture}
\begin{axis}[
width=0.6\linewidth,
height=5cm,
xmin=0,xmax=1,ymin=0,ymax=1,
ytick pos = left,
xtick pos = left,
enlargelimits=false,
tick align = outside,
xlabel={$|k|_{\parallel}$}
]
\end{axis}
\end{tikzpicture}}%
\fbox{
\begin{tikzpicture}
\begin{axis}[
width=0.30\linewidth,
height=5cm,
xmin=0,xmax=0.5,ymin=0,ymax=1,
ytick pos = left,
xtick pos = left,
enlargelimits=false,
tick align = outside,
xlabel={Intensity}
]
\end{axis}
\end{tikzpicture}%
}%
\end{document}
The \fbox{} enironment was just set to see the boundaries. The right graph is in fact smaller than the left one due to the different label, though the y-axes do have the same length. When I use identical labels, everything is nicely aligned.
Any suggestions are appreciated.
Thanks in advance,
John
