-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Improve indentation of Line2D properties in docstrings. #14739
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 indentation of Line2D properties in docstrings. #14739
Conversation
Also, I notice that in the docstrings there are Valid kwargs are
and Valid *kwargs* are
, should we change make kwargs
italic in these cases to keep consistency? or the other way around?
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 thought that there was a problem with the text injection when the % is not no the base column of the docstring, I cannot find the issue though and it apparently works know:
https://22900-1385122-gh.circle-artifacts.com/0/home/circleci/project/doc/build/html/api/_as_gen/matplotlib.axes.Axes.grid.html?highlight=grid#matplotlib.axes.Axes.grid
Maybe numpydoc got better in this since the last time I checked.
Anyway, it works.
e15005a
to
6d93302
Compare
Sorry @bingyao this now needs a rebase.... Please squash your commits as well.
f852193
to
a243188
Compare
@jklymak Hi, I just finished rebasing and squashing.
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.
We're moving now so fast with merging the piled up PRs that this staled in <= 5h. :frown:
@bingyao sorry, but could you please rebase once more?
Anybody can (and should) merge after the rebase.
I resolved it. The online resolver is actually pretty good.
BTW, it was "string"->"str" that caused the conflicts here.
Sorry for the mis-commit there...
3115a43
to
7e212f9
Compare
I think the testing failure of lib/matplotlib/tests/test_axes.py::test_bar_pandas
is due to the setting in:
lib/matplotlib/testing/conftest.py
:
try: from pandas.plotting import ( deregister_matplotlib_converters as deregister) deregister() except ImportError: pass
Although I am not very clear why deregister_matplotlib_converters()
is needed in here as an overall setting.
We deregister the pandas converters because we want pandas to test their own converter and we will test ours. It seems the new version of pandas has broken out tests so suggest we pin away from it until we sort the problem out
@jklymak Thanks! And yes, it's the pandas 0.25.0 that causes the failure, 0.24.2 was fine.
Can we change the test_bar_pandas(pd)
to following to avoid this failure?
def test_bar_pandas(pd): # Smoke test for pandas pd.plotting.register_matplotlib_converters() fig, ax = plt.subplots() df = pd.DataFrame( {'year': [2018, 2018, 2018], 'month': [1, 1, 1], 'day': [1, 2, 3], 'value': [1, 2, 3]}) df['date'] = pd.to_datetime(df[['year', 'month', 'day']]) monthly = df[['date', 'value']].groupby(['date']).sum() dates = monthly.index forecast = monthly['value'] baseline = monthly['value'] ax.bar(dates, forecast, width=10, align='center') ax.plot(dates, baseline, color='orange', lw=4) pd.plotting.deregister_matplotlib_converters()
i.e. register at beginning and deregister at the end.
7e212f9
to
500153e
Compare
500153e
to
0c4714b
Compare
@jklymak Hi, I think the Needs rebase
label can be removed at this time, right? 😄
Uh oh!
There was an error while loading. Please reload this page.
PR Summary
This PR changed indentation of the Line2D properties in a few methods' docstrings.
When typing
help(ax.grid)
orplt.grid?
in IPython/Jupyter:Before the fix:
image
After the fix:
image
The line with only
Properties:
is not added by me, I guess it's something new feature not released yet.