How to remove Icons from legend.
21 views (last 30 days)
Show older comments
Here I have a legend and I would like to remove the bubble and regression line icons as well as display a third item.
legend(['Corr = ',num2str(C)], [' RMSE = ',num2str(R)], [' Bias = ', num2str(B)])
This is the code I used to make the legend. If it cannot be done, is there a way to display my three values on the graph in a vertical orientation?
2 Comments
Geoff Hayes
on 17 Jul 2018
Brandon - if you were able to remove the bubble (circle?) and line "icon" from the legend, then how would you know which legend entry corresponds to which plot on your figure?
Also, please clarify what you mean by display my three values on the graph in a vertical orientation. One follows the other in a column so how is this different from a "vertical orietation"?
Accepted Answer
jonas
on 17 Jul 2018
You are creating a problem by trying to display results in the legend, which is not what it is intended for.
Use an textbox instead.
annotation('textbox',dim,'String',str,'FitBoxToText','on');
Just add a newline character after every entry, e.g.
str=['corr = ',num2str(C),newline,'RMSE = ',num2str(RMSE)]
3 Comments
More Answers (0)
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!