MATLAB Answers

legend bar not visible

1 ビュー (過去 30 日間)
Martin Stump
Martin Stump 2019 年 11 月 26 日
Commented: Star Strider 2019 年 11 月 26 日
Hello
I'm having troubles with the legend function. It somehow stopped working. If I plot three (or one, does not matter) plots in one figure and want to put a legend inside, the color bars don't show up. Any ideas?
untitled.png
figure;
x=1:1000;
hold on;
plot(x,x);
plot(x,x+100);
plot(x,x+200);
hold off;
legend('does','not','work');

  0 件のコメント

サインイン to comment.

採用された回答

Star Strider
Star Strider 2019 年 11 月 26 日
This is a problem with recent versions of AMD video drivers.
The generally-accepted solution is:
opengl('software')
and if you want to:
opengl('save','software')
See the documentation on opengl for more information

  2 件のコメント

Martin Stump
Martin Stump 2019 年 11 月 26 日
thank you very much. It worked. I would have never guessed that, because it works on other plot scripts...
Star Strider
Star Strider 2019 年 11 月 26 日
As always, my pleasure!
I encountered it on my laptop (Ryzen-Radeon) although not on my desktop (Ryzen-Nvidia).
I intend to tell AMD about this, just haven’t yet.

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。

タグ

製品


リリース

R2019b

Translated by