@@ -5789,6 +5789,7 @@ def test_zoom_inset():
5789
5789
xx , rtol = 1e-4 )
5790
5790
5791
5791
5792
+
5792
5793
def test_spines_properbbox_after_zoom ():
5793
5794
fig , ax = plt .subplots ()
5794
5795
bb = ax .spines ['bottom' ].get_window_extent (fig .canvas .get_renderer ())
@@ -5815,3 +5816,20 @@ class DummySubplot(matplotlib.axes.SubplotBase, Dummy):
5815
5816
FactoryDummySubplot = matplotlib .axes .subplot_class_factory (Dummy )
5816
5817
5817
5818
assert DummySubplot is FactoryDummySubplot
5819
+
5820
+
5821
+ @image_comparison (baseline_images = ['annotate_across_transforms' ],
5822
+ style = 'mpl20' , extensions = ['png' ], remove_text = True )
5823
+ def test_annotate_across_transforms ():
5824
+ x = np .linspace (0 , 10 , 200 )
5825
+ y = np .exp (- x ) * np .sin (x )
5826
+
5827
+ fig , ax = plt .subplots (figsize = (3.39 , 3 ))
5828
+ ax .plot (x , y )
5829
+ axins = ax .inset_axes ([0.4 , 0.5 , 0.3 , 0.3 ])
5830
+ axins .set_aspect (0.2 )
5831
+ axins .xaxis .set_visible (False )
5832
+ axins .yaxis .set_visible (False )
5833
+ ax .annotate ("" , xy = (x [150 ], y [150 ]), xycoords = ax .transData ,
5834
+ xytext = (1 , 0 ), textcoords = axins .transAxes ,
5835
+ arrowprops = dict (arrowstyle = "->" ))
0 commit comments