I have a PGFplots set of grouped plots that somewhat resembles the following MWE. The top row of plots has a larger range than the bottom row. Is there a way to have the height of the top row automatically calculated such that the vertical scales - plot coordinates per pixel - on both rows are the same?
For the following example, the range of the top row is -5 to 15 (let me ignore enlarge limits for this), and the range of the bottom row is -5 to 5. So I would like the top row to be twice as high as the bottom row, but I don't want to have to code it explicitly. If I were to change the limits of the top row to (-5,10), then the height of the top row should automatically become 1.5 times that of the bottom row. If I change the limits of the top row to (-5,0), the height of the top row should automatically become 0.5 times that of the bottom row.
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
width=0.5\textwidth,
group style={
group size=2 by 2,
x descriptions at=edge bottom,y descriptions at=edge left,
horizontal sep=0pt,vertical sep=0pt
}
]
\nextgroupplot
\addplot {2*x+5};
\nextgroupplot
\addplot {2*x+5};
\nextgroupplot
\addplot {x};
\nextgroupplot
\addplot {x};
\end{groupplot}
\end{tikzpicture}
\end{document}
Here is the result of compiling the example above as it is:

and here is what I would like it to look like (or something like this):

The fact that the ticks go every 2 units in the second image, not every 5, is somewhat undesirable, but I can deal with that.
Some other factors to consider, which I think are irrelevant (and thus I kept them out of the MWE): in the real situation, the plot has a logarithmic scale on the y axis, and also the axis limits (xmin, ymin, etc.) are explicitly specified.


