@@ -439,25 +439,29 @@ def test_proj_axes_cube():
439439@image_comparison (baseline_images = ['proj3d_axes_cube_ortho' ],
440440 extensions = ['png' ], remove_text = True , style = 'default' )
441441def test_proj_axes_cube_ortho ():
442- M = _test_proj_make_M (proj = 'ortho' )
442+ E = np .array ([200 , 100 , 100 ])
443+ R = np .array ([0 , 0 , 0 ])
444+ V = np .array ([0 , 0 , 1 ])
445+ viewM = proj3d .view_transformation (E , R , V )
446+ orthoM = proj3d .ortho_transformation (- 1 , 1 )
447+ M = np .dot (orthoM , viewM )
443448
444449 ts = '0 1 2 3 0 4 5 6 7 4' .split ()
445- xs = np .array ([0 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 0 , 0 ]) * 300.0
446- ys = np .array ([0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 0 ]) * 300.0
447- zs = np .array ([0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 ]) * 300.0
450+ xs = np .array ([0 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 0 , 0 ]) * 100
451+ ys = np .array ([0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 1 , 0 ]) * 100
452+ zs = np .array ([0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 ]) * 100
448453
449454 txs , tys , tzs = proj3d .proj_transform (xs , ys , zs , M )
450455
451- fig , ax = _test_proj_draw_axes (M , s = 400 )
456+ fig , ax = _test_proj_draw_axes (M , s = 150 )
452457
453- ax .scatter (txs , tys , c = tzs )
458+ ax .scatter (txs , tys , s = 300 - tzs )
454459 ax .plot (txs , tys , c = 'r' )
455460 for x , y , t in zip (txs , tys , ts ):
456461 ax .text (x , y , t )
457462
458- ax .set_xlim (- 5 , 5 )
459- ax .set_ylim (- 5 , 5 )
460- # assertFalse()
463+ ax .set_xlim (- 200 , 200 )
464+ ax .set_ylim (- 200 , 200 )
461465
462466def test_rot ():
463467 V = [1 , 0 , 0 , 1 ]
@@ -520,4 +524,4 @@ def test_autoscale():
520524def test_axes3d_ortho ():
521525 fig = plt .figure ()
522526 ax = fig .gca (projection = '3d' )
523- ax .set_proj ('ortho' )
527+ ax .set_proj_type ('ortho' )
0 commit comments