MATLAB: Does the AREA function not use the specified “FaceColor” property in MATLAB 7.0.1 (R14SP1)

areacolorfacefacecolorMATLABpatchr14sp1incorrectset

I enter the following command in MATLAB 7.0.1 (R14SP1):
h = area([0 2 1 0], [0 1 2 0], 'FaceColor', [1 0 0]);
I expect to see a triangle with a red face. However, the triangle is the same color regardless of the value I specify for the "FaceColor" property. I am also unable to set the "FaceColor" property using the SET command:
set(h, 'FaceColor', [1 0 0]);
The face color of the patch still remains unchanged.
I have to change the face color to another color before I can set it to the one I used in the AREA command:
set(h, 'FaceColor', [0 1 0]);
set(h, 'FaceColor', [1 0 0]);
The color of the face now appears red as expected, but extra steps are required to do this. Is there a more direct approach?

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in the AREA function within MATLAB 7.0.1 (R14SP1).
Currently, to work around this issue, do not specify the "FaceColor" property within the AREA function. You can then use the SET command with the handle to the patch to redefine the face color:
h = area([0 2 1 0], [0 1 2 0]);
set(h, 'FaceColor', [1 0 0]);