Coloring patches in GUI

Hello Matlabers
I am trying to plot a 3d object with patch command on an axis embedded in a gui. If I use a figure everything is fine but when I plot it inside the gui axis the patch surfaces show up all in white with black edges.
for example:
function pushbutton_Callback(hObject, eventdata, handles) axes(handles.axes3);
% Here I specify P1X,P1Y,P1Z,CData
patch(P1X,P1Y,P1Z,CData)
guidata(hObject,handles)
the surfaces of the polygons show up in white
however if I use this code:
figure
% Here I specify P1X,P1Y,P1Z,CData
patch(P1X,P1Y,P1Z,CData)
The surfaces are colored based on the CData that I specified earlier
Any help would be highly appreciated.

Answers (0)

Asked:

on 27 Sep 2013

Edited:

on 27 Sep 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!