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

Positioning enhancements: location-like syntax and axis resize option

Open kakearney opened this issue 9 years ago • 1 comments

Enhancements requested by Joerg Huschke via FEX comments:

  1. The function should support the 'location' input like mathworks original legend does. Basically translate it to the Anchor/Buffer pair as provided in the function help text. I've already done this in my private extension of the function.

  2. When using the 'outside' variants of the legend location then the reference axis to which the legend shall be associated is not reduced to make room for the outside-legend, unlike for the mathworks original legend. So currently the outside positions are not really usable unless I shrink the axis myself before.

kakearney avatar Apr 20 '15 19:04 kakearney

Request 2 is pretty straightforward, and I should be able to implement that soon.

As for 3, I suppose that's a matter of preference... my choice to not mimic Matlab's resize-the-axis-to-make-room-for-a-legend behavior was intentional (particularly when labeling multiple subplots, that behavior always messed up my grid layout). But it shouldn't be too difficult to add an option to resize the axis when the an outside-like legend position is chosen and paired with the parent axis as the reference object.

kakearney avatar Apr 20 '15 19:04 kakearney