legendflex-pkg
legendflex-pkg copied to clipboard
hggroup objects in R2014b+ aren't tagged and can lead to undefined variable "idx" error
This bug was brought to my attention by user Jonathan Allen.
In R2014b+, the objects created by legend.m for labeled hggroup objects are not tagged with their respective legend text label. As a result, legendflex.m is unable to figure out which text label these lines/patches/etc are associated with in the legend. If the first labeled object is an hggroup one, this will result in an error (line 564, idx undefined).
My suggested workaround for this bug is to not pass hggroup objects to legendflex; instead, substitute the handle of one of the hggroup child objects.