Flush Legend

Make legend flush with axes
116 Downloads
Aktualisiert 1 Jul 2016

Lizenz anzeigen

flushLegend makes the legend border flush with the lines of the plot axis. The legend location/position can be made flush with any corner, or at the centre-point of the sides. The location/position is assigned using standard Matlab legend notation (i.e. position_string = 'north', 'south', 'east', 'west', 'northeast', 'northwest' etc.) and abbreviations of these (i.e. position_string = 'n','s', 'e','w','ne','nw', etc).
Making the legend flush with the axis can be useful for making plots looking cleaner, especially if there is limited available space in the plot due to multiple data lines.

Usage:
Minimal usage: flushLegend( legend_handle )
Optional axis handle: flushLegend( legend_handle, axis_handle )
Optional position string: flushLegend( legend_handle, position_string )
Optional BOTH: flushLegend( legend_handle, axis_handle, positionString ): e.g. flushLegend( legend_handle, axis_handle, 'northeast' )

Zitieren als

Robert Richardson (2024). Flush Legend (https://www.mathworks.com/matlabcentral/fileexchange/57962-flush-legend), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2016a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Legend finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0