Convective transitions induced by a varying aspect ratio