File Exchange

image thumbnail


version (5.14 KB) by Michelle Hirsch
Label lines in a plot by clicking on them. Nice and simple.

1 Download

Updated 26 Nov 2019

GitHub view license on GitHub

Did you ever plot a whole bunch of lines and then have trouble telling them apart? You find that a static legend isn't convenient, or just doesn't suffice? Well, with linelabel, simply click on a line and it's identity will be revealed!

Cite As

Michelle Hirsch (2020). linelabel (, GitHub. Retrieved .

Comments and Ratings (8)


exactly what I have been looking for

Adrian Cherry

Very useful.

I tweaked it slightly so that it would work with bar charts as well (R2008a)

lines 131 and 182 now read
if strcmp(htype,'line') || strcmp(htype,'hggroup')



Maurizio Santoro

Very good!

Andres Mahecha-Botero


Antonin Garriga

very good idea

Ju wang

very nice!

Ju wang

very nice!


Connected to GitHub

Updated license

Made available for download as an easy-to-install Toolbox file.

Removed mistaken attribution.

Update copyright.

Add keyword telemetry

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux