-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add a get_zaxis method for 3d axes. #11385
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
Add a get_zaxis method for 3d axes. #11385
Conversation
c7edaf8
to
6f42f2b
Compare
6f42f2b
to
0a70730
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modulo minor docstring issues.
lib/mpl_toolkits/mplot3d/axes3d.py
Outdated
|
||
for ax in self.xaxis, self.yaxis, self.zaxis: | ||
ax.init3d() | ||
|
||
def get_zaxis(self): | ||
'''Return the :class:`ZAxis<~.axis3d.Axis>` instance.''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not link in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Any idea why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For web links there must be a space between the display text and <
. Maybe it's that.
I don't know if this format is supported by (class)-roles (never seen this use-case before).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why. axis3d.Axis
does not have any docstring. I guess I will add one.
Must be something else. Confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to be a fundamental problem. How do you link to a code element like a class using a text that is not the class name itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think :py:meth:`Queue.get <Queue.Queue.get>`
worked for me at some point. At least, I've written that in sphinx-doc/sphinx#4416. 😏
Try :class:`ZAxis <mpl_toolkits.mplot3d.axis3d.Axis>`
or Z\ `.Axis`
. In the latter case, be sure to make the docstring a raw string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
021fa8a
to
e7c3b00
Compare
e7c3b00
to
664ccc8
Compare
@ImportanceOfBeingErnest allowed myself to rebase this for you. Will merge after CI passes. |
PR Summary
Because the normal axes.Axes have a
.get_xaxis
and.get_yaxis
method, which are exposed by theAxes3D
, there should be aget_zaxis
method as well.This adds a
get_zaxis
method to theAxes3D
.PR Checklist