matplotlib: howto set title of whole window?

dmitrey openopt at ukr.net
Sat May 12 03:12:44 EDT 2007


No, it's just another one title
it produces a figure with name "Figure 1" but I should somehow replace
the string.
It is possible in MATLAB via
 set(figureHandler, 'Name', 'my_string_here')

D.

On May 12, 2:52 am, attn.steven.... at gmail.com wrote:
> On May 11, 3:44 pm, dmitrey <open... at ukr.net> wrote:
>
> > hi all,
> > does anyone know howto set title of whole window? (I mean not just
> > area above plot but string in the same line where buttons 'close',
> > 'iconify', 'fullscreen' are situated)
>
> Use coordinates to set a title for the current figure.
> E.g.,
>
> from pylab import *
> from matplotlib.font_manager import FontProperties
>
> figtitle = 'This is my title above all subplots'
>
> t = gcf().text(0.5,
>     0.95, figtitle,
>     horizontalalignment='center',
>     fontproperties=FontProperties(size=16))
>
> subplot(121)
> subplot(122)
> show()
>
> --
> Hope this helps,
> Steven





More information about the Python-list mailing list