필터 지우기
필터 지우기

[MATLAB R2020a] My legend doesn't have any lines

조회 수: 1 (최근 30일)
Kadhiravan Umasankar
Kadhiravan Umasankar 2020년 4월 20일
답변: Chris Jennings 2020년 5월 7일
Hi,
I've plotted three sets of data. When I use legend, however, the text shows up but there aren't any colors. Does anyone know what's wrong? I'm using MATLAB R2020a.
Code:
hold on;
plot(t_out_B, mag_r_B-mag_r_A)
plot(t_out_C, mag_r_C-mag_r_A)
plot(t_out_D, mag_r_D-mag_r_A)
legend('Two body with J2', 'Two body with J2 and J3', 'Two body with atmospheric drag')
hold off;
Output:

답변 (2개)

Star Strider
Star Strider 2020년 4월 21일
This appears to be a problem with current AMD graphics card drivers.
The easiest solution seems to be:
opengl('software')
and then:
opengl('save','software')
See the documentation on opengl for a detailed discussion.
I intend to mention this to AMD, however if you also want to, please do!

Chris Jennings
Chris Jennings 2020년 5월 7일
Well, it's a work around not a very good solution because it stops using the graphics card for all opengl commands.
This can result in very slow graphics, e.g. rotating in 3D becomes slow and stutters.
I will be very interested to hear if AMD is going to come out with a driver fix ...

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by