Simple legend function no longer works in R2014B
13 views (last 30 days)
Show older comments
Sue McMeekin
on 15 Oct 2014
Answered: zerof zhou
on 30 Mar 2016
I just updated to R2014b. I have a simple line as follows in many of my plotting scripts, and none of them works anymore.
For example, if I plot two curves and want to label one as 'A' and one as 'B', I use the following line after the plots:
legend('A', 'B')
This used to work, but after updating Matlab, I get the following error in every script:
Error using legend (line XXX)
Too many input arguments.
Has anyone else had this problem? What do I have to change?
Thanks.
0 Comments
Accepted Answer
Sean de Wolski
on 15 Oct 2014
Sounds like a shadowed file. What is the full text of the error message?
Run the following:
dbstop if error
This will stop on the offending line when the error occurs. Once on this line, run:
which -all whatever_functions_are_there
On all of the functions. More than likely one of them is yours that has been accidentally added to the path.
5 Comments
Star Strider
on 17 Oct 2014
Good luck!
Post the solution here as well when you get this problem resolved.
More Answers (2)
zerof zhou
on 30 Mar 2016
thank you! I come across the same question with you and pick up your help!
0 Comments
See Also
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!