How can I keep a 1:1 aspect ratio after adding a colorbar?
ratio=‘exact’ seems to include the colorbar in the calculations. For example, if I have a circle and color it…I want it to still look like a circle (rather than an ellipse) after adding the colorbar.
How can I keep a 1:1 aspect ratio after adding a colorbar?
After adding the colorbar, try
axis('scaled')
or
axis('image')
or
axis('equal')
Or for full control use the set_aspect() method of the Axes object for your plot. There is also an axis() method corresponding to the pylab axis() function if you are using an OO style.
help(axis) will explain the various axis() options.
Eric
···
ratio='exact' seems to include the colorbar in the calculations. For example, if I have a circle and color it....I want it to still look like a circle (rather than an ellipse) after adding the colorbar.