When I execute the following code,
plot(1:10);legend('Test');
I can see both the plot and the legend text as expected. The line plot is displayed in blue color and the legend text is in black. Now, when I issue the following command:
whitebg
This command changes the axes background color so that it complements the colors in the current figure. In this case the line color complements to yellow and the legend's text color complements to white. When I repeat the PLOT command, it replaces the existing plot and generates a new plot with the line color that is still yellow (in order to be visible against the background complemented by the WHITEBG command issued earlier). This is expected. However, if I issue the LEGEND command again, the text in the legend box is invisible. I expect the text to be displayed in white in order to be visible against the background.
Best Answer