Clear Filters
Clear Filters

How to draw square plot in matlab?

252 views (last 30 days)
Nilanshu Mahant
Nilanshu Mahant on 16 Mar 2022
Answered: Kazi on 29 May 2024
I want to draw individual and subplots in square dimenstion. Is there any command which I can use to get a square plot?

Accepted Answer

Sam Chak
Sam Chak on 16 Mar 2022
Here is the basic to draw a square or any rectangular object. The rectangle function will pick a corner at (2, 3) and then draw a 5-by-5 square.
rectangle('Position',[2 3 5 5])
axis square
axis([0 10 0 10])
Result:
  1 Comment
Nilanshu Mahant
Nilanshu Mahant on 19 Mar 2022
Hello @sam chak
Thanks. Axis square is command which I’m not familiar and I found before 2 days thanks..

Sign in to comment.

More Answers (1)

Kazi
Kazi on 29 May 2024
squre

Community Treasure Hunt

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

Start Hunting!