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

Please use Ipython and follow the steps given below -

In [1]: from matplotlib import pylab

In [2]: fig = pylab.gcf()

In [3]: fig.canvas.set_window_title('Setting up window title.')

Output

raja
Published on 16-Mar-2021 09:40:54
Advertisements