How can I simply use legend ?
Show older comments
It seems that I cannot use the simple comman legend:
clear all
figure
plot(rand(32,1));
legend('test legend')
I get this error: Error using message Too many output arguments.
Error in scribe.legend/methods>set_contextmenu (line 1129) hMenu = graph2dhelper('createScribeUIMenuEntry',fig,'GeneralAction',getString(message('MATLAB:uistring:scribemenu:Refresh')),'','',{@refresh_cb,h});
Error in scribe.legend/methods (line 17) feval(args{:});
Error in scribe.legend/init (line 128) methods(h,'set_contextmenu','on');
Error in scribe.legend (line 122) h.init();
Error in legend>make_legend (line 386) lh=scribe.legend(ha,orient,location,position,children,listen,strings,propargs{:});
Error in legend (line 287) [h,msg] = make_legend(ha,varargin(arg:end));
1 Comment
Azzi Abdelmalek
on 19 Feb 2013
Edited: Azzi Abdelmalek
on 19 Feb 2013
Is this problem, occurred the first time you've used lgend?
Answers (1)
This seems to be R2012a or b, which I cannot check. I guess, that there is a problem with the functions getString or message. What do you get for:
dbstop if error
% Run your program again until it stops at the error. Then:
which getString
which message
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!