Grouping legend entries and adding group identification

OK, I've struggled with the legend doc and the discussion on graphic object groups and the examples therein but doesn't fit the desired effect as near as can tell...
I've a group of lines in a plot, say three which are one set of projected spending levels and another set of three which are historical actual values for the same three classes.
Legend is easy enough to label all six; what I'd like is to group the two sets with an additional label above the two sets that identifies the three subsequent as belong to that class yet retain the labels for the individuals as there's a small distinction to be make per each.
Some time back another poster asked similar and the solution I came up with was to insert a fake non-plotting line that could be used for the legend of the group but it was klunky and error prone at best.
So the question is again is there a better way?

Answers (1)

Are you using R2014b?
In older releases, Kelly's LegendFlex does a decent job and she mentions that it's been updated for R2014b.

1 Comment

dpb
dpb on 31 Oct 2014
Edited: dpb on 31 Oct 2014
No, still at R2012b...
Download; read help -- wow!!! that's a complex interface!
Suppose it's possible but surely isn't clear on first blush how to get the two extra labels in there. The top title line would serve as one it seems; not sure about a second down somewhere in the middle...
Will poke around some; thanks for the pointer/link whatever turns out. (Will hold off for the moment on whether it's "The Answer" or not :) )

Sign in to comment.

Products

Asked:

dpb
on 31 Oct 2014

Edited:

dpb
on 31 Oct 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!