highlight plot with circle

4 ビュー (過去 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 Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by