How can i fill a designed 3d circle in an axes matlab GUI object?
Show older comments
Hi everybody,
actually I've done a Matlab GUI with an object axes and a button. When i press the button, through a button callback, i draw a 3d circle through this function, passing the handles.axes:
function [crf] = EnvironmentSpace(origin_reference,index_col,figure_handles) %Draw the environment space with an enter circle shape acces point origin = origin_reference; radius = 0.10; %[m] angle = linspace(0,2*pi,150); crf(1,:) = origin(1)+radius*cos(angle); crf(2,:) = origin(2)+radius*sin(angle); crf(3,:) = origin(3);
col=hsv(128); index_trasp =0.5; h = figure_handles; plot3(h,crf(1,:),crf(2,:),crf(3,:),'-k','LineWidth',1); %fill3(crf(1,:),crf(2,:),crf(3,:),col(index_col,:), 'FaceAlpha',index_trasp); hold on;
I obatin the 3d circle in the axes object, but when i execute the fill3 instruction I obtain a filled circle in another figure and not in my axes object. I've already set the axes property 'NextPlot' with 'Add', but the problem still persists. I have the same problem with the command 'patch' for draw a 3d parallelepiped in the same axes object in which there is the 3d circle. Can anyone help me?
Morover, how can i set the X,Y,Z label, because in the axes object inspector i can't see the property XName or something like that, but only XLim,YLim,ZLim. Thanks in advance. Best regards.
Marco
Accepted Answer
More Answers (1)
marco
on 4 Sep 2014
0 votes
Categories
Find more on Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!