Jiang
Jiang

Reputation: 157

octave set axis step width consistent when resize window

I want to use drawRect( [0 0 60 60] ) to draw a square. But the step size of x- and y-axis change when I resize the window: enter image description here enter image description here

And both of them don't "look like" square.

So, is there any method to set the x- and y-axis step width consistent? No matter how I resize the window?

Here is the result using @Dan's solution: axis( ..., "equal" )

enter image description here enter image description here

Upvotes: 2

Views: 134

Answers (1)

Dan
Dan

Reputation: 45752

try axis("equal"). From the docs this will

Force x distance to equal y-distance.

Upvotes: 3

Related Questions