@image_comparison(baseline_images=[u'hatching_legend'], extensions=[u'pdf'])
def test_hatching_legend():
 fig = plt.figure(figsize=(1, 2))
 a = plt.Rectangle([0, 0], 0, 0, facecolor=u'green', hatch=u'XXXX')
 b = plt.Rectangle([0, 0], 0, 0, facecolor=u'blue', hatch=u'XXXX')
 fig.legend([a, b, a, b], [u'', u'', u'', u''])

@ image_comparison ( baseline_images = [ u'hatching_legend' ] , extensions = [ u'pdf' ] ) def test_hatching_legend ( ) : fig = plt . figure ( figsize = ( 1 , 2 ) ) a = plt . Rectangle ( [ 0 , 0 ] , 0 , 0 , facecolor = u'green' , hatch = u'XXXX' ) b = plt . Rectangle ( [ 0 , 0 ] , 0 , 0 , facecolor = u'blue' , hatch = u'XXXX' ) fig . legend ( [ a , b , a , b ] , [ u'' , u'' , u'' , u'' ] )
test for correct hatching on patches in legend .