Axis position issue #420

When an axis position was changed to "top" or "bottom", the axis gets
longer. But when it gets changed back to "middle", it stays long.  The
same applies to horizontal axes.

This diff makes it get shorter again.