Code covered by the BSD License  

Highlights from

5.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 3.04 KB File ID: #11234 Version: 1.1
image thumbnail




31 May 2006 (Updated )

Adds plot legend based on 'Tag'

| Watch this File

File Information

This short function will generate a legend based on 'Tag' information given by plot. A legend title is also possible.

figure; hold on; x = 1:10; plot(x,x,'Tag','Positive'); plot(x,-x,'Tag','Negative'); labelplot('eo','v','Slope');

The above example is equivalent to
and adding a text box 'Slope' above it.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
06 Apr 2007 Qi Pan

Fantastic - just what I was looking for! Generates perfect legends which does not require me to specify a fixed number of plot lines! Thanks!

22 Jun 2009 1.1

Add BSD licence.

Contact us