You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, closing a figure is done using the num attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could be the same as a
pyplot-managed figure.
As there are efforts to reduce the dependency on pyplot, such as #14024, this should be changed for those to work well. Alternatively, a way to create a manager which selects an appropiate number could work.
Code for reproduction
importmatplotlib.pyplotasplt# Figure managed by pyplot fig1=plt.figure()
# Figure not managed by pyplot, but using the same backend fig2=fig=plt.new_figure_manager(1).canvas.figurefig1.show()
fig2.show()
Closing figures is done by number
Currently, closing a figure is done using the
num
attribute in the manager. This can cause problems if there are figures not managed by pyplot, as the number could be the same as apyplot-managed figure.
As there are efforts to reduce the dependency on pyplot, such as #14024, this should be changed for those to work well. Alternatively, a way to create a manager which selects an appropiate number could work.
Code for reproduction
Actual outcome
Closing one figure closes both.
Expected outcome
Closing one figure leaves the other open.
Matplotlib version
print(matplotlib.get_backend())
): Qt5AggThe text was updated successfully, but these errors were encountered: