Placing circle on floor of scatter3 plot

조회 수: 3 (최근 30일)
Holm Roeser
Holm Roeser 2021년 4월 2일
편집: Jay Vincelli 2021년 4월 2일
I currently have an 11x11x11 scatter array of intensities. I wish to underlay a mock electrode as a flat black circle centered at the origin. Confused on how to display a solid circle on the same plot as this visualization. Thanks!

채택된 답변

Jay Vincelli
Jay Vincelli 2021년 4월 2일
편집: Jay Vincelli 2021년 4월 2일
This can also be solved using the patch() function to plot the parametric equation of a circle:
% Create and plot sphere grid
[X,Y,Z] = meshgrid(-2.5:.5:2.5,-2.5:.5:2.5,0:.5:5);
scatter3(X(:),Y(:),Z(:),'filled')
% Create and plot circle
C = [0,0,0]; % Center of circle
R = 1 ; % Radius of circle
theta = 0:0.01:2*pi;
x = C(1)+R*cos(theta);
y = C(2)+R*sin(theta);
z = C(3)+zeros(size(x));
hold on
patch(x,y,z,'k');
hold off
axis equal

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by