@@ -203,6 +203,35 @@ def test_quiver3d_masked():
203203
204204 ax .quiver (x , y , z , u , v , w , length = 0.1 )
205205
206+ @image_comparison (baseline_images = ['quiver3d_pivot_middle' ], remove_text = True ,
207+ extensions = ['png' ])
208+ def test_quiver3d_pivot_middle ():
209+ fig = plt .figure ()
210+ ax = fig .gca (projection = '3d' )
211+
212+ x , y , z = np .ogrid [- 1 :0.8 :10j , - 1 :0.8 :10j , - 1 :0.6 :3j ]
213+
214+ u = np .sin (np .pi * x ) * np .cos (np .pi * y ) * np .cos (np .pi * z )
215+ v = - np .cos (np .pi * x ) * np .sin (np .pi * y ) * np .cos (np .pi * z )
216+ w = (np .sqrt (2.0 / 3.0 ) * np .cos (np .pi * x ) * np .cos (np .pi * y ) *
217+ np .sin (np .pi * z ))
218+
219+ ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'middle' )
220+
221+ @image_comparison (baseline_images = ['quiver3d_pivot_tail' ], remove_text = True ,
222+ extensions = ['png' ])
223+ def test_quiver3d_pivot_tail ():
224+ fig = plt .figure ()
225+ ax = fig .gca (projection = '3d' )
226+
227+ x , y , z = np .ogrid [- 1 :0.8 :10j , - 1 :0.8 :10j , - 1 :0.6 :3j ]
228+
229+ u = np .sin (np .pi * x ) * np .cos (np .pi * y ) * np .cos (np .pi * z )
230+ v = - np .cos (np .pi * x ) * np .sin (np .pi * y ) * np .cos (np .pi * z )
231+ w = (np .sqrt (2.0 / 3.0 ) * np .cos (np .pi * x ) * np .cos (np .pi * y ) *
232+ np .sin (np .pi * z ))
233+
234+ ax .quiver (x , y , z , u , v , w , length = 0.1 , pivot = 'tail' )
206235
207236if __name__ == '__main__' :
208237 import nose
0 commit comments