License

LEGENDTITLE adds a title inside the legend axes.
LEGENDTITLE(LEGH,TITLESTR) adds the title TITLESTR to the legend LEGH
LEGENDTITLE(TITLESTR) adds the title to the current legend in the current axes.
LEGENDTITLE(...,Param,Val) sets the specified properties for the text object.
H = LEGENDTITLE(...) returns the handle for the text object used to create the title string.
By default, the legend title uses the same font as the legend, but with a bold font weight.

The function worked fine but will not allow the legend to be placed outside the axes.

Thierry Dalon

7 Jul 2008

With R2008a it works perfectly.
It puts the title inside the box legend in bold.
(Default title property of legend put a title outside of the legend box).

Romario Do Nacimento

14 Jun 2007

The function doesn't work in Matlab 14!!
Another option please!

valik pol

20 Feb 2006

Didn't work: error in line 68: Function 'mrdivide' is not defined for values of class 'cell'.
I personally liked Jos' solution better, but this is supposed to put the title INSIDE the legend! And anyway, thanks for bringing up the issue! ;-)

Michel Garcia

29 Apr 2005

didn't work!

Holger Krause

7 Oct 2004

Unfortunately this nice function doesn't work with R14.

Chris Rodgers

16 Jun 2004

Although this looks nice when first applied to a plot, it gets messed up as soon as I resize the plot... :-( This is more important than it might initially seem, since I use the exportfig.m tools to export / print my figures and this always involves a resize.

Andreas Hartmann

1 Jun 2004

Nice function, and not redundant, it adds the title _inside_ the legend box