フィルターのクリア

How to draw rectangle inside plot figure?

36 ビュー (過去 30 日間)
Mohsin Zubair
Mohsin Zubair 2022 年 1 月 7 日
コメント済み: Mohsin Zubair 2022 年 1 月 7 日
I have a 6x6 plot like shown in picture with grid on, it has boxes numbering from 1-36,(boxes are just due to having grid on) now I wanna draw traingle on any boxes e.g 14,15, how can I do it, like how do I define the x,y cords and width height for rectangle correctly, any ideas?
  1 件のコメント
Cris LaPierre
Cris LaPierre 2022 年 1 月 7 日
Share the code you use to create your figure.

サインインしてコメントする。

採用された回答

Cris LaPierre
Cris LaPierre 2022 年 1 月 7 日
Rectangle or triangle? Title and image show a rectangle so going with that.
You could use the plot command and supply it with the (x,y) coordinates of your corners. See Ch 9 of MATLAB Onramp.
You could use the rectangle function.
If you want to draw it, you could use drawrectangle
  1 件のコメント
Mohsin Zubair
Mohsin Zubair 2022 年 1 月 7 日
I was already using rectangle function, and I have figured the way to obtained desired results. Apologies for bothering you guys. and also thanks for your kind responce

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by