MATLAB: Legend bar not visible

barlegendMATLABplot

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');

Best Answer

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