Legend error (does not display 'line' in legend box)
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sangmin Lee
am 8 Nov. 2019
Bearbeitet: Star Strider
am 2 Okt. 2020
If I simply plot using the below code
x=0:0.1:10;
>> figure; plot(x,sin(x))
>> legend('on')
>> hold on
>> scatter(x, cos(x))
The figure looks like the below figure. The legend shows no 'line' for the first graph. It shows only circle.
How can I fix this problem?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 8 Nov. 2019
Using:
opengl('save','software')
seems to be a solution for that problem.
5 Kommentare
Star Strider
am 29 Sep. 2020
Bearbeitet: Star Strider
am 2 Okt. 2020
The actual solution is to upgrade to the latest AMD video card driver.
That option was not available when I wrote this, and is now.
EDIT — (2 Oct 2020 at 19:32)
Adam Danz
am 29 Sep. 2020
My Windows 10 system indicates that my currently installed Radeon 540x Series is the best driver for the machine. I didn't have this problem on my 8-year old laptop. 😕
Your solution to use opengl software is a good one but it introduces other problems like jagged edges for some lines. The need to widen line widths is annoyoing but worth mentioning so others are aware of that workaround.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!