Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc]: Invert Axes example sets x-lims directly #28050

Closed
rcomer opened this issue Apr 9, 2024 · 0 comments · Fixed by #28055
Closed

[Doc]: Invert Axes example sets x-lims directly #28050

rcomer opened this issue Apr 9, 2024 · 0 comments · Fixed by #28055

Comments

@rcomer
Copy link
Member

rcomer commented Apr 9, 2024

Documentation Link

https://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/invert_axes.html

Problem

This example shows how to invert the x-axis by using ax.set_xlim. I would have expected it to use the set_inverted method on the x-axis: that is more flexible as it doesn't prevent autoscaling on subsequent calls.

I note that this example pre-dates the addition of set_inverted to the library.

Suggested improvement

Either change the existing code to use set_inverted or add a second figure within the example to show its use.

@rcomer rcomer changed the title [Doc]: Invert Axes example set x-lims directly [Doc]: Invert Axes example sets x-lims directly Apr 9, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 10, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 11, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 11, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 11, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 12, 2024
timhoffm added a commit to timhoffm/matplotlib that referenced this issue Apr 12, 2024
@timhoffm timhoffm modified the milestone: v3.10.0 Apr 12, 2024
@QuLogic QuLogic added this to the v3.8-doc milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants