Omar Omar - 6 months ago 28
Python Question

Change figure window title in pylab

How can I set a figure window's title in pylab/python?

fig = figure(9) # 9 is now the title of the window
fig.set_title("Test") #doesn't work
fig.title = "Test" #doesn't work

Answer

If you want to actually change the window you can do:

fig = pylab.gcf()
fig.canvas.set_window_title('Test')