highlight plot with circle

8 views (last 30 days)
Mudasir Ahmad Sheikh
Mudasir Ahmad Sheikh 2021年8月22日
Commented: Image Analyst 上23 Aug 2021
I have a ber plot and I want to highlight this plot with a circle or any eliptical shape indicating (M×N).
2 Comments
Mudasir Ahmad Sheikh
Mudasir Ahmad Sheikh 2021年8月22日
No! Please see the attached figure

Sign in to comment.

Accepted Answer

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 Comments
awais saeed
awais saeed 2021年8月22日
you are welcome.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst 2021年8月22日
如果您知道中心和半径,则可以绘制椭圆形:
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正方形;
xlim([0 20]);
ylim([0 20]);
grid;
If you have an existing plot, call hold on before plotting the ellipse so it doesn't blow away your prior plotted data.
2 Comments
Image Analyst
Image Analyst 上23 Aug 2021
@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.

Sign in to comment.

Community Treasure Hunt

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

开始狩猎!