legendflex-pkg icon indicating copy to clipboard operation
legendflex-pkg copied to clipboard

Legend axes unselectable in GUI after 'box', 'off'

Open justinwager opened this issue 7 years ago • 3 comments

Hi Kelly - great package and clever implementation of axes to create the legend. I've found that inputting 'box' as 'off' sets the axes object property 'visible' to 'off', which has the side effect of rendering the legend unselectable via the GUI (e.g., for manual relocation).

I'd like to suggest a slight change to how this is handled - instead of 'visible' to 'off', setting these properties has the effect of hiding the box, but keeps it selectable: 'box': 'off' 'XColor': white (or get the current figure color)
'YColor': white (or get the current figure color)

If you'd like me to submit a pull request, let me know.

justinwager avatar Jul 14 '17 16:07 justinwager

I like the concept. However, setting the axis line colors will only work properly if the legend isn't on top of anything (including data in an axis).

For more recent versions of Matlab (2014b+), I can set the X- and YColor properties to 'none', which will properly hide everything. I'll go ahead and implement your suggestion using that variant.

For older versions (where 'none' is not an axis color option), I'll have to think a bit to see if there's a robust solution that hides everything while maintaining selectability.

kakearney avatar Jul 14 '17 19:07 kakearney

Great point. Setting them to 'none' is a much better solution. I'll see if I can think up anything for older versions.

justinwager avatar Jul 19 '17 14:07 justinwager

2014b+ fix implemented: f29cb4e0e78691b9f0fd82d94408fbdf6c7bb1d6

kakearney avatar Aug 08 '17 18:08 kakearney