Skip to content

Commit 0873285

Browse files
authored
No longer call draw_if_interactive in parasite_axes. (#23156)
This is a remnant of the pre-staleness system, where all pyplot functions used to call draw_if_interactive to trigger a draw_idle; this has now been superseded with the stale system which likewise triggers a draw_idle (here via add_subplot, which marks the figure as stale). This way, the only remaining places that call draw_if_interactive internally are in plt.figure() and in figure unpickling.
1 parent 3df958c commit 0873285

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/mpl_toolkits/axes_grid1/parasite_axes.py

-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ def host_axes(*args, axes_class=Axes, figure=None, **kwargs):
257257
figure = plt.gcf()
258258
ax = host_axes_class(figure, *args, **kwargs)
259259
figure.add_axes(ax)
260-
plt.draw_if_interactive()
261260
return ax
262261

263262

@@ -280,5 +279,4 @@ def host_subplot(*args, axes_class=Axes, figure=None, **kwargs):
280279
figure = plt.gcf()
281280
ax = host_subplot_class(figure, *args, **kwargs)
282281
figure.add_subplot(ax)
283-
plt.draw_if_interactive()
284282
return ax

0 commit comments

Comments
 (0)