Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added autoscaling support for add_collection3d #25659

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

Closed
wants to merge 3 commits into from
Closed

Added autoscaling support for add_collection3d #25659

wants to merge 3 commits into from

Conversation

lganic
Copy link
Contributor

@lganic lganic commented Apr 10, 2023

PR Summary

Fixes #17130

The code does work but might not be the cleanest implementation. However because a lot of the required functionality which would normally do this is grandfathered in from 2D matplotlib, a clean solution would require extensive writing/rewriting of the 3D side of things.

Also I was only able to implement this for Line3DCollection, and PolyCollection, despite add_collection3d also supporting LineCollections, and PatchCollections. Sadly I could not figure out implementation of the same 3D to 2D workarounds for those datatypes.

PR Checklist

Documentation and Tests

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

Release Notes

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

lganic added 2 commits April 10, 2023 16:31
Fixes #17130

The code does work but might not be the cleanest implementation. However because a lot of the required functionality which would normally do this is grandfathered in from 2D matplotlib, a clean solution would require extensive writing/rewriting of the 3D side of things. 

Also I was only able to implement this for Line3DCollection, and PolyCollection, despite add_collection3d also supporting LineCollections, and PatchCollections. Sadly I could not figure out implementation of the same 3D to 2D workarounds for those datatypes.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@ksunden
Copy link
Member

ksunden commented Apr 10, 2023

Something seems to have happened that every line has been changed, making it very hard to see what the actual change is here.

One likely explanation would be that line endings were converted to windows line endings. You can set up git to handle this transformation: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platform=windows

The files as they are checked in to git should have lf endings (unix-style) rather than cr-lf endings (windows-style).

Please also make sure to squash/rebase to preserve the git blame for the rest of the file:

https://matplotlib.org/stable/devel/development_workflow.html#rewriting-commit-history

@lganic lganic closed this Apr 15, 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.

autoscale_view is not working with Line3DCollection
3 participants