Skip to content

Fixed issue #23171 where axes vlines() / hlines() doesn't autoscale correctly with blended transform. - #24695

Closed
aalmasmari wants to merge 1 commit into
matplotlib:mainfrom
aalmasmari:bugfix-for-issue23171
Closed

aalmasmari wants to merge 1 commit into
matplotlib:mainfrom
aalmasmari:bugfix-for-issue23171

Conversation

@aalmasmari

@aalmasmari aalmasmari commented Dec 11, 2022 •

Copy link
Copy Markdown
Contributor

PR Summary

Changed vlines() and hlines() of axes to not autoscale on the horizontal/vertical axis given a transform argument. This is so that it doesn't autoscale incorrectly, treating the minimum argument as a data coordinate, as mentioned in issue #23171

PR Checklist

Documentation and Tests

  • [ Yes] Has pytest style unit tests (and pytest passes)
  • [ N/A ] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [ N/A ] New plotting related features are documented with examples.

Release Notes

  • [N/A ] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [ N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A ] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@aalmasmari aalmasmari changed the title Fixed issue where axes vlines() / hlines() doesn't autoscale correctly with blended transform. Fixed issue #23171 where axes vlines() / hlines() doesn't autoscale correctly with blended transform. Dec 12, 2022
@aalmasmari
aalmasmari marked this pull request as ready for review December 12, 2022 01:38
@jklymak

jklymak commented Jan 22, 2023

Copy link
Copy Markdown
Member

@aalmasmari Sorry for the poor response on this. It would be helpful if you included the before and after behaviour change this introduces, and/or added tests to tests/test_axes.py near the other test_hline tests. Otherwise, you are asking us to do a lot of detective work to figure out what this fixes and why the fix is correct. Thanks!

@jklymak

jklymak commented Jan 30, 2023

Copy link
Copy Markdown
Member

Moving to draft pending response! Thanks!

@jklymak
jklymak marked this pull request as draft January 30, 2023 23:30

@QuLogic QuLogic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct fix, as the wrong values are already added to the data limits. If another thing is plotted afterwards that requests an autoscale of the skipped direction, then the problem will still occur.

@melissawm

Copy link
Copy Markdown
Member

Hi folks - do we have a way forward here?

@QuLogic

QuLogic commented Apr 4, 2023

Copy link
Copy Markdown
Member

I think the correct fix is moving forward in #25324.

@melissawm

Copy link
Copy Markdown
Member

Ok. So does this mean this one should be closed, or is there anything we can do here?

@QuLogic

QuLogic commented Apr 19, 2023

Copy link
Copy Markdown
Member

Yes, now that I've merged #25324, I think we can close this one.

@QuLogic QuLogic closed this Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants