필터 지우기
필터 지우기

How to remove Icons from legend.

조회 수: 21 (최근 30일)
Brandon Bush
Brandon Bush 2018년 7월 17일
편집: Brandon Bush 2018년 7월 17일
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
Geoff Hayes
Geoff Hayes 2018년 7월 17일
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"?
Brandon Bush
Brandon Bush 2018년 7월 17일
The three values I am trying to place on the graph are for Correlation, Bias and Root Mean Square Error. They dont have anything to do with the points on the graph. I should have specified that earlier.
Also when I was making the legend the first time the values were only showing up in a horizontal orientation

댓글을 달려면 로그인하십시오.

채택된 답변

jonas
jonas 2018년 7월 17일
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
jonas
jonas 2018년 7월 17일
Thanks, did not know that works. Always happy to learn!
Brandon Bush
Brandon Bush 2018년 7월 17일
편집: Brandon Bush 2018년 7월 17일
Thanks, didnt know there was an annotation function.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by