@@ -1206,22 +1206,32 @@ def test_arc_angles():
12061206 w = 2
12071207 h = 1
12081208 centre = (0.2 , 0.5 )
1209+ scale = 2
12091210
12101211 fig , axs = plt .subplots (3 , 3 )
12111212 for i , ax in enumerate (axs .flat ):
12121213 theta2 = i * 360 / 9
12131214 theta1 = theta2 - 45
1215+
12141216 ax .add_patch (patches .Ellipse (centre , w , h , alpha = 0.3 ))
12151217 ax .add_patch (patches .Arc (centre , w , h , theta1 = theta1 , theta2 = theta2 ))
12161218 # Straight lines intersecting start and end of arc
1217- ax .plot ([2 * np .cos (np .deg2rad (theta1 )) + centre [0 ],
1219+ ax .plot ([scale * np .cos (np .deg2rad (theta1 )) + centre [0 ],
12181220 centre [0 ],
1219- 2 * np .cos (np .deg2rad (theta2 )) + centre [0 ]],
1220- [2 * np .sin (np .deg2rad (theta1 )) + centre [1 ],
1221+ scale * np .cos (np .deg2rad (theta2 )) + centre [0 ]],
1222+ [scale * np .sin (np .deg2rad (theta1 )) + centre [1 ],
12211223 centre [1 ],
1222- 2 * np .sin (np .deg2rad (theta2 )) + centre [1 ]])
1223- ax .set_xlim (- 2 , 2 )
1224- ax .set_ylim (- 2 , 2 )
1224+ scale * np .sin (np .deg2rad (theta2 )) + centre [1 ]])
1225+
1226+ ax .set_xlim (- scale , scale )
1227+ ax .set_ylim (- scale , scale )
1228+
1229+ # This looks the same, but it triggers a different code path when it
1230+ # gets large enough.
1231+ w *= 10
1232+ h *= 10
1233+ centre = (centre [0 ] * 10 , centre [1 ] * 10 )
1234+ scale *= 10
12251235
12261236
12271237@image_comparison (baseline_images = ['arc_ellipse' ],
0 commit comments