MATLAB: Does the legend font size change when I change another property on the figure by right clicking

changefontlegendMATLABpropertysize;

Why does my legend font size change when I change another property on my figure by right clicking?
When a line in the figure below is selected and the color changed by right clicking on the line and selecting change color, the font size of the legend changes back to the default size.
x=(1:1:10);
plot(x,x)
lgd=legend('not my size')
set(lgd,'FontSize',6)

Best Answer

This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB that has been forwarded to our development staff to be addressed in a future release of MATLAB.
Currently as a workaround, you can change the color of the line by directly using its handle.
For example:
x=(1:1:10);
hline=plot(x,x)
lgd=legend('not my size')
set(lgd,'FontSize',6)
set(hline, 'color', 'green')
You can also change the color of the line interactively by using the property editor. You can start the property editor by typing the following at the command prompt:
propedit