legendflex.m: a more flexible, customizable legend

Create a legend with more flexible positioning and labeling capabilities

https://github.com/kakearney/legendflex-pkg

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Kelly Kearney (2026). legendflex.m: a more flexible, customizable legend (https://github.com/kakearney/legendflex-pkg), GitHub. Retrieved .

Acknowledgements

Inspired by: SETPOS 1.2 - GETPOS 1.2

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.9.0.1

linked GitHub readme

1.9.0.0

Updated description (which was erased when the github link was added)

1.8.0.0

- Corrected some remaining R2014b bugs; all graphics handles should now be objects rather than numeric if running in R2014b or later.
- Switched source to github repository

1.7.0.0

Added note regarding legendflex with the Latex interpreter

1.6.0.0

Added parameter to modify padding between legend box and text/symbols

1.5.0.0

- updated for R2014b graphics

1.4.0.0

Now respects manual changes made by user (including legend height, width, and units) when resizing.

1.3.0.0

Fixed bug where very wide titles were not completely enclosed in legend box.

1.2.0.0

bug fixes: fixed error in function resize if you delete the legend, fixed minor vertical alignment issue

1.1.0.0

Figure resize now re-links legend and labeled objects with updated line/patch properties.

1.0.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.