@image_comparison(baseline_images=[u'legend_expand'], remove_text=True)
def test_legend_expand():
 legend_modes = [None, u'expand']
 (fig, axes_list) = plt.subplots(len(legend_modes), 1)
 x = np.arange(100)
 for (ax, mode) in zip(axes_list, legend_modes):
  ax.plot(x, (50 - x), u'o', label=u'y=1')
  l1 = ax.legend(loc=2, mode=mode)
  ax.add_artist(l1)
  ax.plot(x, (x - 50), u'o', label=u'y=-1')
  l2 = ax.legend(loc=5, mode=mode)
  ax.add_artist(l2)
  ax.legend(loc=3, mode=mode, ncol=2)

@ image_comparison ( baseline_images = [ u'legend_expand' ] , remove_text = True ) def test_legend_expand ( ) : legend_modes = [ None , u'expand' ] ( fig , axes_list ) = plt . subplots ( len ( legend_modes ) , 1 ) x = np . arange ( 100 ) for ( ax , mode ) in zip ( axes_list , legend_modes ) : ax . plot ( x , ( 50 - x ) , u'o' , label = u'y=1' ) l1 = ax . legend ( loc = 2 , mode = mode ) ax . add_artist ( l1 ) ax . plot ( x , ( x - 50 ) , u'o' , label = u'y=-1' ) l2 = ax . legend ( loc = 5 , mode = mode ) ax . add_artist ( l2 ) ax . legend ( loc = 3 , mode = mode , ncol = 2 )
test expand mode .