필터 지우기
필터 지우기

highlight plot with circle

조회 수: 1 (최근 30일)
mudasir ahmad sheikh
mudasir ahmad sheikh 2021년 8월 22일
댓글: Image Analyst 2021년 8월 23일
I have a ber plot and I want to highlight this plot with a circle or any eliptical shape indicating (M×N).
  댓글 수: 2
Awais Saeed
Awais Saeed 2021년 8월 22일
What do you mean by higlighting with circle. Do you mean like this
mudasir ahmad sheikh
mudasir ahmad sheikh 2021년 8월 22일
No! Please see the attached figure

댓글을 달려면 로그인하십시오.

채택된 답변

Awais Saeed
Awais Saeed 2021년 8월 22일
I do not know if its possible programmatically but you can acheive this using the Insert option of figure window
  댓글 수: 2
mudasir ahmad sheikh
mudasir ahmad sheikh 2021년 8월 22일
Thanks Awaise.
Awais Saeed
Awais Saeed 2021년 8월 22일
you are welcome.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2021년 8월 22일
You can draw an ellipse if you know the center and radii:
xCenter = 12.5;
yCenter = 10;
xRadius = 2.5;
yRadius = 8;
theta = 0 : 0.01 : 2*pi;
x = xRadius * cos(theta) + xCenter;
y = yRadius * sin(theta) + yCenter;
plot(x, y, 'LineWidth', 3);
axis square;
xlim([0 20]);
ylim([0 20]);
grid on;
If you have an existing plot, call hold on before plotting the ellipse so it doesn't blow away your prior plotted data.
  댓글 수: 2
mudasir ahmad sheikh
mudasir ahmad sheikh 2021년 8월 23일
Thanks
Image Analyst
Image Analyst 2021년 8월 23일
@mudasir ahmad sheikh, you're welcome. Also I'm attaching a bunch of ellipse demos that you may find fun or interesting. You can "Vote" for my answer if they help you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by