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
{{ message }}
Repository navigation
AttributeError: 'NoneType' object has no attribute 'canvas' #5663
Removing an ax created with twinx/twiny and then adding a new one with a plot, or just setting xlim/ylim for it triggers the crash (twinx -> xlim, twiny -> ylim).
importmatplotlibmatplotlib.use('TkAgg') # same with 'agg'importmatplotlib.pyplotaspltfig=plt.figure()
ax1=fig.add_subplot(111)
ax2=ax1.twinx()
ax2.remove()
ax3=fig.add_subplot(111)
ax3.set_xlim([1, 5])
plt.show()
Activity
tacaswell commentedon Dec 13, 2015
Apparently the remove is not doing enough clean up
Also note that
ax1 is ax3 == True.FIX/ENH: do more clean up when removing axes