I'm trying to add a title to the legend block in a plot I've got in Octave (like this). I've had a dig through the properties that are available on the plot and have found the 'title' attribute, but when I set it there's no change on the plot.
Here's an example of what I'm trying:
a=linspace(0, 2*pi())
h=plot(sin(a))
hleg = legend("Data 1")
set(hleg, 'title', 'Data Series')
I've also tried this:
hlegtitle = get(hleg, 'title')
get(hlegtitle, 'string')
which returns Data Series
, so I'm clearly setting the property, but the title does not appear on the legend.
Is there something else that needs to be set somewhere -- is the title block being drawn off-screen, or is there a boolean or something that causes it to be hidden I've compared the various properties on hlegtitle
with those for other components of the plot, and they all seem the same.
Is there something that I'm missing, or is this just not possible?