# Interconnected graphs in pgfplots

Is it possible to create interconnected graphs in pgfplots (e.g. common grids), like the picture below?

And, related to the question above, if you have one tikzpicture environment with two axis environments, is it possible to ensure, that both will have exactly the same measure on both x and y axis?

Edit: I tried to write x axis grid manually, but I had problems using foreach. E.g. example below simply does not work (bunch of endcsname errors).

\documentclass{minimal}
\usepackage{tikz,pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[samples=505,domain=0:630]
\foreach \i in {180,360,540} {\node (a\i) at (axis cs:\i,0) {};}

\end{axis}
\end{tikzpicture}
\end{document}
-