The attached script demonstrates several bugs that are all related to the Axes class. Areas affected are:
* Inverting Axis objects
* Fixed aspect ratio
1) Auto scaling is not enacted when adding a Patch to an axes (more of a feature)
2) When manually calling axes.autoscale_view(), the boundaries of an Ellipse are incorrectly computed as they do not take into
account the rotation of the ellipse.
3) Inverting the axes using the current method of reversing the axes limits does not always take effect right away. An explicit
call to axes.apply_aspect() fixes this.
4) When the axes are inverted and an Ellipse is rendered, then it becomes asymptotic and not an ellipse.
5) When the axes are inverted and axes.set_aspect('equal', 'datalim') has been called, then resizing the plot window will result in
the axes reverting back to their original state.
When it comes to handling inverted axes I have a proposition on how to better handle this. It seems like every other month a user
asks the question how to do this and perhaps there should be a direct interface to do so. Something like the following...
Each method would set a flag on the corresponding Axis object and all calls to 'axes.set_xlim' & 'axes.set_ylim' would check the
appropriate flag and automatically set the values in the correct order. Additionally all calls to 'axes.get_xlim' and
'axes.get_ylim' would return the values in min, max order. I believe that an interface like this would greatly simplify things for
both the user and the maintainer of the internal code (no need to put in checks to see if the axes have been inverted). A simple
'axes.xaxis_inverted' or 'axes.yaxis_inverted' call would be sufficient to determine if the axes have been inverted (for those users
who would need to check).
Get latest updates about Open Source Projects, Conferences and News.