Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
Bug summary
canvas.manager.set_window_title does not work to figure withWebAgg
backend (but MacOSX). the title is stillFigure 1
by default.
Code for reproduction
importmatplotlib.pyplotaspltimportnumpyasnpimportmatplotlibmatplotlib.use("WebAgg")fig=plt.figure(figsize=(7,5))fig.canvas.manager.set_window_title("My figure")ax=fig.add_subplot(111)dx,dy=0.05,0.05y,x=np.mgrid[slice(1,5+dy,dy),slice(1,5+dx,dx)]z=np.sin(x)**10+np.cos(10+y*x)*np.cos(x)cf=ax.contourf(x+dx/2.,y+dy/2.,z)fig.colorbar(cf,ax=ax)plt.show()
Actual outcome

Expected outcome

Additional information
it works in MacOSX backends

Operating system
macOS Sequoia 15.1.1
Matplotlib Version
3.9.3
Matplotlib Backend
WebAgg
Python version
3.12.7
Jupyter version
No response
Installation
pip