@image_comparison(baseline_images=[u'legend_auto1'], remove_text=True)
def test_legend_auto1():
 fig = plt.figure()
 ax = fig.add_subplot(111)
 x = np.arange(100)
 ax.plot(x, (50 - x), u'o', label=u'y=1')
 ax.plot(x, (x - 50), u'o', label=u'y=-1')
 ax.legend(loc=0)

@ image_comparison ( baseline_images = [ u'legend_auto1' ] , remove_text = True ) def test_legend_auto1 ( ) : fig = plt . figure ( ) ax = fig . add_subplot ( 111 ) x = np . arange ( 100 ) ax . plot ( x , ( 50 - x ) , u'o' , label = u'y=1' ) ax . plot ( x , ( x - 50 ) , u'o' , label = u'y=-1' ) ax . legend ( loc = 0 )
test automatic legend placement .