subplot(1,2,1) plot([1.,1.],[0,3.]) ax=gca() ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') ax.spines['bottom'].set_position('zero') ax.spines['top'].set_color('none') #ax.spines['left'].set_smart_bounds(True) #ax.spines['bottom'].set_smart_bounds(True) ax.xaxis.set_ticks_position('bottom') ax.yaxis.set_ticks_position('left') xlim([-2.,2.]) ylim([-1.,3.5]) subplot(1,2,2) plot([-10.,10.],[0,0.1]) ax=gca() xlim([-2.,2.]) ylim([-1.,3.5])