1

In the figure below, x-axis goes upto 54 and y-axis upto 8. However, the size of both is same. I would like to make the figure proportionate. I.e. x-axis should be longer than y-axis by a ratio of 54/8. Any suggestions?

fig = plt.figure()
plt.xlim(0,54)
plt.ylim(0,8)
#plt.axis('off')
plt.show()
plt.close()

enter image description here

1 Answer 1

2

Just add the following line:

fig = plt.figure()
plt.xlim(0,54)
plt.ylim(0,8)
plt.axes().set_aspect('equal')
plt.show()

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.