Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
interactive = is_interactive()
for manager in managers:
manager.show()
# plt.figure adds an event which puts the figure in focus
# in the activeQue. Disable this behaviour, as it results in
# figures being put as the active figure after they have been
# shown, even in non-interactive mode.
if hasattr(manager, '_cidgcf'):
manager.canvas.mpl_disconnect(manager._cidgcf)
if not interactive and manager in Gcf._activeQue:
Gcf._activeQue.remove(manager)
show = Show()
def draw_if_interactive():
import matplotlib._pylab_helpers as pylab_helpers
if is_interactive():
manager = pylab_helpers.Gcf.get_active()
if manager is not None:
manager.show()
def connection_info():
"""
Return a string showing the figure and connection status for
the backend. This is intended as a diagnostic tool, and not for general
use.
"""