@image_comparison(baseline_images=[u'interp_nearest_vs_none'], extensions=[u'pdf', u'svg'], remove_text=True)
def test_interp_nearest_vs_none():
 rcParams[u'savefig.dpi'] = 3
 X = np.array([[[218, 165, 32], [122, 103, 238]], [[127, 255, 0], [255, 99, 71]]], dtype=np.uint8)
 fig = plt.figure()
 ax1 = fig.add_subplot(121)
 ax1.imshow(X, interpolation=u'none')
 ax1.set_title(u'interpolation none')
 ax2 = fig.add_subplot(122)
 ax2.imshow(X, interpolation=u'nearest')
 ax2.set_title(u'interpolation nearest')

@ image_comparison ( baseline_images = [ u'interp_nearest_vs_none' ] , extensions = [ u'pdf' , u'svg' ] , remove_text = True ) def test_interp_nearest_vs_none ( ) : rcParams [ u'savefig.dpi' ] = 3 X = np . array ( [ [ [ 218 , 165 , 32 ] , [ 122 , 103 , 238 ] ] , [ [ 127 , 255 , 0 ] , [ 255 , 99 , 71 ] ] ] , dtype = np . uint8 ) fig = plt . figure ( ) ax1 = fig . add_subplot ( 121 ) ax1 . imshow ( X , interpolation = u'none' ) ax1 . set_title ( u'interpolation none' ) ax2 = fig . add_subplot ( 122 ) ax2 . imshow ( X , interpolation = u'nearest' ) ax2 . set_title ( u'interpolation nearest' )
test the effect of "nearest" and "none" interpolation .