Issue
How do I combine those statements:
pyplot.axis([1234.0, 1773.0, 497.0, 1362.0])
pyplot.axis('equal')
I just want to define the limits of my axes, but with an equal scale in both directions.
P.S.: I tried pyplot.axis([1234.0, 1773.0, 497.0, 1362.0], 'equal')
, but didn't worked.
Solution
The scale still seemed not right with using
pyplot.axis([1234.0, 1773.0, 497.0, 1362.0], aspect = 'equal')
I searched a bit further on StackOverflow and changed my code to:
pyplot.axis([xmin, xmax, ymin, ymax])
pyplot.gca().set_aspect('equal', adjustable='box')
The adjustable='box'
was necessary for a question about a 3D plot, but seems also necessary for my 2D plot.
Sources:
Answered By - Matthias
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.