A comparative spatial analysis of majoritarian and proportional elections