Code covered by the BSD License  

Highlights from
labelplot

5.0

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

labelplot

by Will Robertson

 

31 May 2006 (Updated 22 Jun 2009)

Adds plot legend based on 'Tag'

| Watch this File

File Information
Description

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
  legend('Positive','Negative')
and adding a text box 'Slope' above it.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
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!

Please login to add a comment or rating.
Updates
22 Jun 2009

Add BSD licence.

Tag Activity for this File
Tag Applied By Date/Time
annotation Will Robertson 22 Oct 2008 08:27:17
customization Will Robertson 22 Oct 2008 08:27:17
legend Will Robertson 22 Oct 2008 08:27:17
label Will Robertson 22 Oct 2008 08:27:17
plot Will Robertson 22 Oct 2008 08:27:17
tag Will Robertson 22 Oct 2008 08:27:17
graphics Will Robertson 22 Oct 2008 08:27:17

Contact us at files@mathworks.com