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