No BSD License  

Highlights from
update legend

2.0

2.0 | 1 rating Rate this file 2 Downloads (last 30 days) File Size: 970 Bytes File ID: #5886

update legend

by nino wallace

 

17 Sep 2004 (Updated 20 Sep 2004)

With this function you can refresh the existing legend.

| Watch this File

File Information
Description

This function allows refreshing of the existing legend. It works like standard 'plot' command, but you have to pass like arguments the property tag. It is mandatory. Maybe there is some bug...you can correct it.

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
30 Oct 2005 Jared Millington

This doesn't quite work as well as it could. The function input arguments should be varargin rather than (var1,var2,varargin). This will fix the problem of needing 'tag' and 'property_tag' arguments. This was caused by the for/loop found on line 23. It would be quicker to use get(...) and set(...) to change the color, linetype, marker, string name, etc.

23 Jul 2011 Nicolas

% get the legends handle
leg = findobj(gcf,'Type','axes','Tag','legend');
% delete it an load it again:
delete(leg);
legend show;

% certainly now not an all matching solution, but it might help some of you...

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation nino wallace 22 Oct 2008 07:31:41
customization nino wallace 22 Oct 2008 07:31:41
legend nino wallace 22 Oct 2008 07:31:41
update nino wallace 22 Oct 2008 07:31:41
figure nino wallace 22 Oct 2008 07:31:41
graphics nino wallace 22 Oct 2008 07:31:41

Contact us at files@mathworks.com