Change figure window title in pylab(Python)

MatplotlibServer Side ProgrammingProgramming

Using pylab.gcf(), we can create a fig variable and can set the fig.canvas.set_window_title('Setting up window title.') window title.

Steps

• Using gcf() method, get the current figure. If no current figure exists, a new one is created using ~.pyplot.figure().

• Set the title text of the window containing the figure, using set_window_title() method.. Note that this has no effect if there is no window (e.g., a PS backend).

Example

In [1]: from matplotlib import pylab
In [3]: fig.canvas.set_window_title('Setting up window title.')