@@ -65,21 +65,21 @@ def test_interp_nearest_vs_none():
6565
6666def do_figimage (suppressComposite ):
6767 """ Helper for the next two tests """
68- fig = plt .figure (figsize = (2 ,2 ), dpi = 100 )
68+ fig = plt .figure (figsize = (2 , 2 ), dpi = 100 )
6969 fig .suppressComposite = suppressComposite
70- x ,y = np .ix_ (np .arange (100.0 ) / 100.0 , np .arange (100.0 ) / 100.0 )
70+ x , y = np .ix_ (np .arange (100 ) / 100.0 , np .arange (100 ) / 100 )
7171 z = np .sin (x ** 2 + y ** 2 - x * y )
7272 c = np .sin (20 * x ** 2 + 50 * y ** 2 )
7373 img = z + c / 5
7474
7575 fig .figimage (img , xo = 0 , yo = 0 , origin = 'lower' )
76- fig .figimage (img [::- 1 ,:], xo = 0 , yo = 100 , origin = 'lower' )
77- fig .figimage (img [:,::- 1 ], xo = 100 , yo = 0 , origin = 'lower' )
78- fig .figimage (img [::- 1 ,::- 1 ], xo = 100 , yo = 100 , origin = 'lower' )
76+ fig .figimage (img [::- 1 , :], xo = 0 , yo = 100 , origin = 'lower' )
77+ fig .figimage (img [:, ::- 1 ], xo = 100 , yo = 0 , origin = 'lower' )
78+ fig .figimage (img [::- 1 , ::- 1 ], xo = 100 , yo = 100 , origin = 'lower' )
7979
8080
8181@image_comparison (baseline_images = ['figimage-0' ],
82- extensions = ['png' ,'pdf' ])
82+ extensions = ['png' , 'pdf' ])
8383def test_figimage0 ():
8484 'test the figimage method'
8585
@@ -88,7 +88,7 @@ def test_figimage0():
8888
8989
9090@image_comparison (baseline_images = ['figimage-1' ],
91- extensions = ['png' ,'pdf' ])
91+ extensions = ['png' , 'pdf' ])
9292def test_figimage1 ():
9393 'test the figimage method'
9494 suppressComposite = True
@@ -97,7 +97,7 @@ def test_figimage1():
9797
9898def test_image_python_io ():
9999 fig , ax = plt .subplots ()
100- ax .plot ([1 ,2 , 3 ])
100+ ax .plot ([1 , 2 , 3 ])
101101 buffer = io .BytesIO ()
102102 fig .savefig (buffer )
103103 buffer .seek (0 )
@@ -277,22 +277,22 @@ def test_image_cliprect():
277277 import matplotlib .patches as patches
278278
279279 fig , ax = plt .subplots ()
280- d = [[1 ,2 ],[3 ,4 ]]
280+ d = [[1 , 2 ], [3 , 4 ]]
281281
282- im = ax .imshow (d , extent = (0 ,5 , 0 , 5 ))
282+ im = ax .imshow (d , extent = (0 , 5 , 0 , 5 ))
283283
284284 rect = patches .Rectangle (
285- xy = (1 ,1 ), width = 2 , height = 2 , transform = im .axes .transData )
285+ xy = (1 , 1 ), width = 2 , height = 2 , transform = im .axes .transData )
286286 im .set_clip_path (rect )
287287
288288
289289@image_comparison (baseline_images = ['imshow' ], remove_text = True , style = 'mpl20' )
290290def test_imshow ():
291291 fig , ax = plt .subplots ()
292292 arr = np .arange (100 ).reshape ((10 , 10 ))
293- ax .imshow (arr , interpolation = "bilinear" , extent = (1 ,2 , 1 , 2 ))
294- ax .set_xlim (0 ,3 )
295- ax .set_ylim (0 ,3 )
293+ ax .imshow (arr , interpolation = "bilinear" , extent = (1 , 2 , 1 , 2 ))
294+ ax .set_xlim (0 , 3 )
295+ ax .set_ylim (0 , 3 )
296296
297297
298298@image_comparison (baseline_images = ['no_interpolation_origin' ],
@@ -403,10 +403,10 @@ def test_rasterize_dpi():
403403
404404 axes [0 ].imshow (img )
405405
406- axes [1 ].plot ([0 ,1 ], [0 ,1 ], linewidth = 20. , rasterized = True )
406+ axes [1 ].plot ([0 , 1 ], [0 , 1 ], linewidth = 20. , rasterized = True )
407407 axes [1 ].set (xlim = (0 , 1 ), ylim = (- 1 , 2 ))
408408
409- axes [2 ].plot ([0 ,1 ], [0 ,1 ], linewidth = 20. )
409+ axes [2 ].plot ([0 , 1 ], [0 , 1 ], linewidth = 20. )
410410 axes [2 ].set (xlim = (0 , 1 ), ylim = (- 1 , 2 ))
411411
412412 # Low-dpi PDF rasterization errors prevent proper image comparison tests.
@@ -673,7 +673,7 @@ def test_image_preserve_size2():
673673 ax = plt .Axes (fig , [0.0 , 0.0 , 1.0 , 1.0 ])
674674 ax .set_axis_off ()
675675 fig .add_axes (ax )
676- ax .imshow (data , interpolation = 'nearest' , origin = 'lower' ,aspect = 'auto' )
676+ ax .imshow (data , interpolation = 'nearest' , origin = 'lower' , aspect = 'auto' )
677677 buff = io .BytesIO ()
678678 fig .savefig (buff , dpi = 1 )
679679
@@ -837,7 +837,7 @@ def test_imshow_bignumbers():
837837 # putting a big number in an array of integers shouldn't
838838 # ruin the dynamic range of the resolved bits.
839839 fig , ax = plt .subplots ()
840- img = np .array ([[1 , 2 , 1e12 ],[3 , 1 , 4 ]], dtype = np .uint64 )
840+ img = np .array ([[1 , 2 , 1e12 ], [3 , 1 , 4 ]], dtype = np .uint64 )
841841 pc = ax .imshow (img )
842842 pc .set_clim (0 , 5 )
843843
@@ -849,7 +849,7 @@ def test_imshow_bignumbers_real():
849849 # putting a big number in an array of integers shouldn't
850850 # ruin the dynamic range of the resolved bits.
851851 fig , ax = plt .subplots ()
852- img = np .array ([[2. , 1. , 1.e22 ],[4. , 1. , 3. ]])
852+ img = np .array ([[2. , 1. , 1.e22 ], [4. , 1. , 3. ]])
853853 pc = ax .imshow (img )
854854 pc .set_clim (0 , 5 )
855855
0 commit comments