필터 지우기
필터 지우기

How can I fix the legend text color?

조회 수: 1 (최근 30일)
Md Zillur Rahman
Md Zillur Rahman 2017년 2월 3일
댓글: Walter Roberson 2017년 2월 4일
I have generated legends using Matlab 2016b and Matlab 2013b. However, the quality of the default legend text color is not good in 2016b (see the first image). Legend texts were not even legible after printing. How I get the legend text color in 2016b as same as the default legend text color of 2013b (see the second image)? Please let me know. Thank you very much.
>>

답변 (1개)

Walter Roberson
Walter Roberson 2017년 2월 3일
Try asking for more than one output from legend(). That will trigger it to use a different way of building the text -- and if it is still not quite right then the handles in the second output can be used to change the properties.
  댓글 수: 4
Md Zillur Rahman
Md Zillur Rahman 2017년 2월 4일
I have solved the issue. I needed to make sure ''visible'' ''on'' in the following line. Thank you very much for your solution.
style = @(LineStyle, MarkerStyle) plot(0,0,LineStyle,'Marker',MarkerStyle,'visible','off')
Walter Roberson
Walter Roberson 2017년 2월 4일
visible on or off would not cause problems with the legend() call, but without the "hold on" the second call to style() is going to remove the output of the first call to style, leading to you passing deleted handles into legend()

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

카테고리

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