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

Skip to content

Remove 3D attributes from renderer #18302

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

Merged
merged 5 commits into from
Oct 23, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 20, 2020

PR Summary

There's no need to do so, as artists have .axes property from which they can get the same information. Since this is a weird internal undocumented draw thing, I'm not sure if it needs a deprecation/API note.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [n/a] New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • [n/a] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

@QuLogic QuLogic added this to the v3.4.0 milestone Aug 20, 2020
@QuLogic QuLogic force-pushed the 3d-renderer-attrib branch from b111f1b to 86d0fc1 Compare August 20, 2020 22:02
Copy link
Member

@WeatherGod WeatherGod left a comment

Choose a reason for hiding this comment

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

This does seem like it would work, but I do think it the special voodoo needs more comments to explain it.

@QuLogic QuLogic force-pushed the 3d-renderer-attrib branch from ebac289 to a61a68a Compare October 3, 2020 03:29
@dopplershift
Copy link
Contributor

@WeatherGod I'm not sure if this answer it or not. This code:

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection='3d')
s = ax.plot_surface(np.ones((4,4)), np.ones((4,4)), np.ones((4,4)))
plt.draw()
s.do_3d_projection(fig.canvas.renderer)

currently produces a warning:

MatplotlibDeprecationWarning: 
The 'renderer' parameter of do_3d_projection() was deprecated in Matplotlib 3.4 and will be removed two minor releases later. If any parameter follows 'renderer', they should be passed as keyword, not positionally.
  s.do_3d_projection(fig.canvas.renderer)

# Then axes
for axis in self._get_axis_list():
axis.draw(renderer)
props3d = {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a note which of the following code can be removed once the deprecation expires.

Copy link
Member Author

Choose a reason for hiding this comment

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

Basically all of it... Updated the comment.

@QuLogic QuLogic force-pushed the 3d-renderer-attrib branch from a61a68a to a769837 Compare October 22, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants