Change location of legend in a legned(h,{.....}) format

2 ビュー (過去 30 日間)
monkey_matlab
monkey_matlab 2016 年 10 月 25 日
回答済み: Star Strider 2016 年 10 月 25 日
Hello,
I was using the example found on the "Train SVM Classifiers" and there is this command to draw the legend:
legend(h,{'-1','+1','Support Vectors'});
I tried to change the location of the legend by typing:
legend(h,{'-1','+1','Support Vectors','Location', 'northwest'});
but this line did not work and give me the error "Warning: Ignoring extra legend entries. ..."
How do I go about changing the location of the legend in this case? Thanks!

回答 (1 件)

Star Strider
Star Strider 2016 年 10 月 25 日
Try this:
legend(h,{'-1','+1','Support Vectors'},'Location', 'northwest');

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by