-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve Figure docstrings #10595
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
Improve Figure docstrings #10595
Conversation
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.
This seems fine, except for the one typo (IMO) at the beginning.
lib/matplotlib/colorbar.py
Outdated
@@ -152,7 +152,7 @@ | |||
default to the current image. | |||
|
|||
cax : :class:`~matplotlib.axes.Axes` object, optional | |||
Axis into which the colorbar will be drawn | |||
Axis into which the colorbar will be drawn. |
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.
Should be "Axes"
Strange. Just updated a typo in a docstring and suddenly an image comparison test fails. Did anything else in the build environment change? |
Yeah, I've seen the same thing. Restarting the job often gets it to pass. Not sure what causes the instability. |
Is there a way to restart just a specific CI service or job? Up to now, I've usually rebased in such a case, which then triggers the CI as a side effect. |
For Travis, you can just hit restart. For appveyor I think you need to log in and can restart. Its a bit of a pain. |
The failures are consistent across tests, but I'm not sure why they suddenly started appearing. |
From the changed rms I would assume that some commit slightly changed the output, just about enough to make this test fail. |
Rebased. |
lib/matplotlib/figure.py
Outdated
axes = property(fget=_get_axes, | ||
doc="List of axes in the Figure. You can access and " | ||
"modify the axes in the Figure through this list. " | ||
"Do not modify the list itself. Instead, use " |
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.
the second and third sentence are contradicting each other.
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.
No. Assume fig.axes
being [ax1, ax2]
. You can access and modify ax1
, e.g. fix.axes[0].set_xlim(0, 1)
. But you cannot add or remove an axes from the figure by fig.axes.append(ax3)
or similar.
Suggestions how to describe this more clearly are welcome.
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.
just remove the "and modify" in the first sentence? it's not as if python had a notion of const reference anyways...
lib/matplotlib/figure.py
Outdated
return self.dpi | ||
|
||
def get_frameon(self): | ||
"""Get the boolean indicating frameon.""" | ||
"""Return a bool indicating whether the figure frame will be dawn.""" |
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 tend to write these just as "return whether ..." which seems less verbose and just as clear.
Also typo: dawn.
thanks |
Improve Figure docstrings Conflicts: lib/matplotlib/figure.py - kept master version of docstring in 2 cases
PR Summary
The title says all.