@@ -18,7 +18,8 @@ def test_aspect_equal_error():
18
18
ax .set_aspect ('equal' )
19
19
20
20
21
- @image_comparison (['bar3d.png' ], remove_text = True )
21
+ @image_comparison (['bar3d.png' ],
22
+ remove_text = True , style = 'default' )
22
23
def test_bar3d ():
23
24
fig = plt .figure ()
24
25
ax = fig .add_subplot (111 , projection = '3d' )
@@ -30,7 +31,8 @@ def test_bar3d():
30
31
ax .bar (xs , ys , zs = z , zdir = 'y' , align = 'edge' , color = cs , alpha = 0.8 )
31
32
32
33
33
- @image_comparison (['bar3d_shaded.png' ], remove_text = True )
34
+ @image_comparison (['bar3d_shaded.png' ],
35
+ remove_text = True , style = 'default' )
34
36
def test_bar3d_shaded ():
35
37
x = np .arange (4 )
36
38
y = np .arange (5 )
@@ -50,7 +52,8 @@ def test_bar3d_shaded():
50
52
fig .canvas .draw ()
51
53
52
54
53
- @image_comparison (['bar3d_notshaded.png' ], remove_text = True )
55
+ @image_comparison (['bar3d_notshaded.png' ],
56
+ remove_text = True , style = 'default' )
54
57
def test_bar3d_notshaded ():
55
58
fig = plt .figure ()
56
59
ax = fig .add_subplot (111 , projection = '3d' )
@@ -63,7 +66,8 @@ def test_bar3d_notshaded():
63
66
fig .canvas .draw ()
64
67
65
68
66
- @image_comparison (['contour3d.png' ], remove_text = True , style = 'mpl20' )
69
+ @image_comparison (['contour3d.png' ],
70
+ remove_text = True , style = 'default' )
67
71
def test_contour3d ():
68
72
fig = plt .figure ()
69
73
ax = fig .gca (projection = '3d' )
@@ -76,7 +80,8 @@ def test_contour3d():
76
80
ax .set_zlim (- 100 , 100 )
77
81
78
82
79
- @image_comparison (['contourf3d.png' ], remove_text = True )
83
+ @image_comparison (['contourf3d.png' ],
84
+ remove_text = True , style = 'default' )
80
85
def test_contourf3d ():
81
86
fig = plt .figure ()
82
87
ax = fig .gca (projection = '3d' )
@@ -89,7 +94,8 @@ def test_contourf3d():
89
94
ax .set_zlim (- 100 , 100 )
90
95
91
96
92
- @image_comparison (['contourf3d_fill.png' ], remove_text = True )
97
+ @image_comparison (['contourf3d_fill.png' ],
98
+ remove_text = True , style = 'default' )
93
99
def test_contourf3d_fill ():
94
100
fig = plt .figure ()
95
101
ax = fig .gca (projection = '3d' )
@@ -104,7 +110,8 @@ def test_contourf3d_fill():
104
110
ax .set_zlim (- 1 , 1 )
105
111
106
112
107
- @image_comparison (['tricontour.png' ], remove_text = True , style = 'mpl20' )
113
+ @image_comparison (['tricontour.png' ],
114
+ remove_text = True , style = 'default' )
108
115
def test_tricontour ():
109
116
fig = plt .figure ()
110
117
@@ -119,7 +126,8 @@ def test_tricontour():
119
126
ax .tricontourf (x , y , z )
120
127
121
128
122
- @image_comparison (['lines3d.png' ], remove_text = True )
129
+ @image_comparison (['lines3d.png' ],
130
+ remove_text = True , style = 'default' )
123
131
def test_lines3d ():
124
132
fig = plt .figure ()
125
133
ax = fig .gca (projection = '3d' )
@@ -131,7 +139,8 @@ def test_lines3d():
131
139
ax .plot (x , y , z )
132
140
133
141
134
- @image_comparison (['mixedsubplot.png' ], remove_text = True )
142
+ @image_comparison (['mixedsubplot.png' ],
143
+ remove_text = True , style = 'default' )
135
144
def test_mixedsubplots ():
136
145
def f (t ):
137
146
return np .cos (2 * np .pi * t ) * np .exp (- t )
@@ -168,7 +177,8 @@ def test_tight_layout_text(fig_test, fig_ref):
168
177
ax2 .text (.5 , .5 , .5 , s = 'some string' )
169
178
170
179
171
- @image_comparison (['scatter3d.png' ], remove_text = True )
180
+ @image_comparison (['scatter3d.png' ],
181
+ remove_text = True , style = 'default' )
172
182
def test_scatter3d ():
173
183
fig = plt .figure ()
174
184
ax = fig .add_subplot (111 , projection = '3d' )
@@ -178,7 +188,8 @@ def test_scatter3d():
178
188
c = 'b' , marker = '^' )
179
189
180
190
181
- @image_comparison (['scatter3d_color.png' ], remove_text = True )
191
+ @image_comparison (['scatter3d_color.png' ],
192
+ remove_text = True , style = 'default' )
182
193
def test_scatter3d_color ():
183
194
fig = plt .figure ()
184
195
ax = fig .add_subplot (111 , projection = '3d' )
@@ -188,7 +199,8 @@ def test_scatter3d_color():
188
199
color = 'b' , marker = 's' )
189
200
190
201
191
- @image_comparison (['plot_3d_from_2d.png' ], remove_text = True )
202
+ @image_comparison (['plot_3d_from_2d.png' ],
203
+ remove_text = True , style = 'default' , tol = 0.01 )
192
204
def test_plot_3d_from_2d ():
193
205
fig = plt .figure ()
194
206
ax = fig .add_subplot (111 , projection = '3d' )
@@ -198,7 +210,8 @@ def test_plot_3d_from_2d():
198
210
ax .plot (xs , ys , zs = 0 , zdir = 'y' )
199
211
200
212
201
- @image_comparison (['surface3d.png' ], remove_text = True )
213
+ @image_comparison (['surface3d.png' ],
214
+ remove_text = True , style = 'default' )
202
215
def test_surface3d ():
203
216
fig = plt .figure ()
204
217
ax = fig .gca (projection = '3d' )
@@ -213,7 +226,8 @@ def test_surface3d():
213
226
fig .colorbar (surf , shrink = 0.5 , aspect = 5 )
214
227
215
228
216
- @image_comparison (['surface3d_shaded.png' ], remove_text = True )
229
+ @image_comparison (['surface3d_shaded.png' ],
230
+ remove_text = True , style = 'default' )
217
231
def test_surface3d_shaded ():
218
232
fig = plt .figure ()
219
233
ax = fig .gca (projection = '3d' )
@@ -227,7 +241,7 @@ def test_surface3d_shaded():
227
241
ax .set_zlim (- 1.01 , 1.01 )
228
242
229
243
230
- @image_comparison (['text3d.png' ])
244
+ @image_comparison (['text3d.png' ], style = 'default' )
231
245
def test_text3d ():
232
246
fig = plt .figure ()
233
247
ax = fig .gca (projection = '3d' )
@@ -251,7 +265,8 @@ def test_text3d():
251
265
ax .set_zlabel ('Z axis' )
252
266
253
267
254
- @image_comparison (['trisurf3d.png' ], remove_text = True , tol = 0.03 )
268
+ @image_comparison (['trisurf3d.png' ],
269
+ remove_text = True , tol = 0.03 , style = 'default' )
255
270
def test_trisurf3d ():
256
271
n_angles = 36
257
272
n_radii = 8
@@ -269,7 +284,8 @@ def test_trisurf3d():
269
284
ax .plot_trisurf (x , y , z , cmap = cm .jet , linewidth = 0.2 )
270
285
271
286
272
- @image_comparison (['trisurf3d_shaded.png' ], remove_text = True , tol = 0.03 )
287
+ @image_comparison (['trisurf3d_shaded.png' ],
288
+ remove_text = True , tol = 0.03 , style = 'default' )
273
289
def test_trisurf3d_shaded ():
274
290
n_angles = 36
275
291
n_radii = 8
@@ -287,23 +303,26 @@ def test_trisurf3d_shaded():
287
303
ax .plot_trisurf (x , y , z , color = [1 , 0.5 , 0 ], linewidth = 0.2 )
288
304
289
305
290
- @image_comparison (['wireframe3d.png' ], remove_text = True )
306
+ @image_comparison (['wireframe3d.png' ],
307
+ remove_text = True , style = 'default' )
291
308
def test_wireframe3d ():
292
309
fig = plt .figure ()
293
310
ax = fig .add_subplot (111 , projection = '3d' )
294
311
X , Y , Z = axes3d .get_test_data (0.05 )
295
312
ax .plot_wireframe (X , Y , Z , rcount = 13 , ccount = 13 )
296
313
297
314
298
- @image_comparison (['wireframe3dzerocstride.png' ], remove_text = True )
315
+ @image_comparison (['wireframe3dzerocstride.png' ],
316
+ remove_text = True , style = 'default' )
299
317
def test_wireframe3dzerocstride ():
300
318
fig = plt .figure ()
301
319
ax = fig .add_subplot (111 , projection = '3d' )
302
320
X , Y , Z = axes3d .get_test_data (0.05 )
303
321
ax .plot_wireframe (X , Y , Z , rcount = 13 , ccount = 0 )
304
322
305
323
306
- @image_comparison (['wireframe3dzerorstride.png' ], remove_text = True )
324
+ @image_comparison (['wireframe3dzerorstride.png' ],
325
+ remove_text = True , style = 'default' )
307
326
def test_wireframe3dzerorstride ():
308
327
fig = plt .figure ()
309
328
ax = fig .add_subplot (111 , projection = '3d' )
@@ -329,7 +348,8 @@ def test_mixedsamplesraises():
329
348
ax .plot_surface (X , Y , Z , cstride = 50 , rcount = 10 )
330
349
331
350
332
- @image_comparison (['quiver3d.png' ], remove_text = True )
351
+ @image_comparison (['quiver3d.png' ],
352
+ remove_text = True , style = 'default' )
333
353
def test_quiver3d ():
334
354
fig = plt .figure ()
335
355
ax = fig .gca (projection = '3d' )
@@ -344,7 +364,8 @@ def test_quiver3d():
344
364
ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'tip' , normalize = True )
345
365
346
366
347
- @image_comparison (['quiver3d_empty.png' ], remove_text = True )
367
+ @image_comparison (['quiver3d_empty.png' ],
368
+ remove_text = True , style = 'default' )
348
369
def test_quiver3d_empty ():
349
370
fig = plt .figure ()
350
371
ax = fig .gca (projection = '3d' )
@@ -359,7 +380,8 @@ def test_quiver3d_empty():
359
380
ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'tip' , normalize = True )
360
381
361
382
362
- @image_comparison (['quiver3d_masked.png' ], remove_text = True )
383
+ @image_comparison (['quiver3d_masked.png' ],
384
+ remove_text = True , style = 'default' )
363
385
def test_quiver3d_masked ():
364
386
fig = plt .figure ()
365
387
ax = fig .gca (projection = '3d' )
@@ -378,7 +400,8 @@ def test_quiver3d_masked():
378
400
ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'tip' , normalize = True )
379
401
380
402
381
- @image_comparison (['quiver3d_pivot_middle.png' ], remove_text = True )
403
+ @image_comparison (['quiver3d_pivot_middle.png' ],
404
+ remove_text = True , style = 'default' )
382
405
def test_quiver3d_pivot_middle ():
383
406
fig = plt .figure ()
384
407
ax = fig .gca (projection = '3d' )
@@ -393,7 +416,8 @@ def test_quiver3d_pivot_middle():
393
416
ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'middle' , normalize = True )
394
417
395
418
396
- @image_comparison (['quiver3d_pivot_tail.png' ], remove_text = True )
419
+ @image_comparison (['quiver3d_pivot_tail.png' ],
420
+ remove_text = True , style = 'default' )
397
421
def test_quiver3d_pivot_tail ():
398
422
fig = plt .figure ()
399
423
ax = fig .gca (projection = '3d' )
@@ -408,7 +432,8 @@ def test_quiver3d_pivot_tail():
408
432
ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'tail' , normalize = True )
409
433
410
434
411
- @image_comparison (['poly3dcollection_closed.png' ], remove_text = True )
435
+ @image_comparison (['poly3dcollection_closed.png' ],
436
+ remove_text = True , style = 'default' )
412
437
def test_poly3dcollection_closed ():
413
438
fig = plt .figure ()
414
439
ax = fig .gca (projection = '3d' )
@@ -430,7 +455,8 @@ def test_poly_collection_2d_to_3d_empty():
430
455
assert poly .get_paths () == []
431
456
432
457
433
- @image_comparison (['poly3dcollection_alpha.png' ], remove_text = True )
458
+ @image_comparison (['poly3dcollection_alpha.png' ],
459
+ remove_text = True , style = 'default' )
434
460
def test_poly3dcollection_alpha ():
435
461
fig = plt .figure ()
436
462
ax = fig .gca (projection = '3d' )
@@ -447,7 +473,7 @@ def test_poly3dcollection_alpha():
447
473
ax .add_collection3d (c2 )
448
474
449
475
450
- @image_comparison (['axes3d_labelpad.png' ])
476
+ @image_comparison (['axes3d_labelpad.png' ], style = 'default' )
451
477
def test_axes3d_labelpad ():
452
478
from matplotlib import rcParams
453
479
@@ -469,7 +495,7 @@ def test_axes3d_labelpad():
469
495
tick .set_pad (tick .get_pad () - i * 5 )
470
496
471
497
472
- @image_comparison (['axes3d_cla.png' ])
498
+ @image_comparison (['axes3d_cla.png' ], style = 'default' )
473
499
def test_axes3d_cla ():
474
500
# fixed in pull request 4553
475
501
fig = plt .figure ()
@@ -540,7 +566,8 @@ def _test_proj_draw_axes(M, s=1, *args, **kwargs):
540
566
return fig , ax
541
567
542
568
543
- @image_comparison (['proj3d_axes_cube.png' ], remove_text = True , style = 'default' )
569
+ @image_comparison (['proj3d_axes_cube.png' ],
570
+ remove_text = True , style = 'default' )
544
571
def test_proj_axes_cube ():
545
572
M = _test_proj_make_M ()
546
573
@@ -672,7 +699,8 @@ def test_invalid_axes_limits(setter, side, value):
672
699
673
700
674
701
class TestVoxels :
675
- @image_comparison (['voxels-simple.png' ], remove_text = True )
702
+ @image_comparison (['voxels-simple.png' ],
703
+ remove_text = True , style = 'default' )
676
704
def test_simple (self ):
677
705
fig , ax = plt .subplots (subplot_kw = {"projection" : "3d" })
678
706
@@ -692,7 +720,8 @@ def test_edge_style(self):
692
720
# change the edge color of one voxel
693
721
v [max (v .keys ())].set_edgecolor ('C2' )
694
722
695
- @image_comparison (['voxels-named-colors.png' ], remove_text = True )
723
+ @image_comparison (['voxels-named-colors.png' ],
724
+ remove_text = True , style = 'default' )
696
725
def test_named_colors (self ):
697
726
"""Test with colors set to a 3d object array of strings."""
698
727
fig , ax = plt .subplots (subplot_kw = {"projection" : "3d" })
@@ -705,7 +734,8 @@ def test_named_colors(self):
705
734
colors [(x + z ) < 10 ] = 'cyan'
706
735
ax .voxels (voxels , facecolors = colors )
707
736
708
- @image_comparison (['voxels-rgb-data.png' ], remove_text = True )
737
+ @image_comparison (['voxels-rgb-data.png' ],
738
+ remove_text = True , style = 'default' )
709
739
def test_rgb_data (self ):
710
740
"""Test with colors set to a 4d float array of rgb data."""
711
741
fig , ax = plt .subplots (subplot_kw = {"projection" : "3d" })
@@ -718,7 +748,8 @@ def test_rgb_data(self):
718
748
colors [..., 2 ] = z / 9
719
749
ax .voxels (voxels , facecolors = colors )
720
750
721
- @image_comparison (['voxels-alpha.png' ], remove_text = True )
751
+ @image_comparison (['voxels-alpha.png' ],
752
+ remove_text = True , style = 'default' )
722
753
def test_alpha (self ):
723
754
fig , ax = plt .subplots (subplot_kw = {"projection" : "3d" })
724
755
@@ -736,7 +767,7 @@ def test_alpha(self):
736
767
assert voxels [coord ], "faces returned for absent voxel"
737
768
assert isinstance (poly , art3d .Poly3DCollection )
738
769
739
- @image_comparison (['voxels-xyz.png' ], tol = 0.01 )
770
+ @image_comparison (['voxels-xyz.png' ], tol = 0.01 , style = 'default' )
740
771
def test_xyz (self ):
741
772
fig , ax = plt .subplots (subplot_kw = {"projection" : "3d" })
742
773
0 commit comments