X Tutup
Skip to content

DOC: Clean up the pie docstring PR#8371

Merged
QuLogic merged 4 commits intomatplotlib:masterfrom
phobson:pie-docstring
Mar 25, 2017
Merged

DOC: Clean up the pie docstring PR#8371
QuLogic merged 4 commits intomatplotlib:masterfrom
phobson:pie-docstring

Conversation

@phobson
Copy link
Copy Markdown
Member

@phobson phobson commented Mar 24, 2017

Supersedes #8357

Builds upon @kahnchana 's work with some minor reorganization


- *patches* is a sequence of
:class:`matplotlib.patches.Wedge` instances
.. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Soon, we won't need this anymore :D

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@NelleV curious: what does the future look like in this regard?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On matplotlib, I am not sure, as our pyplot API page is gigantic, but on sklearn it looks like this:
http://scikit-learn.org/stable/modules/generated/sklearn.isotonic.IsotonicRegression.html#sklearn.isotonic.IsotonicRegression

If you scroll down, you'll see all examples using the isotonic regression (there's only one).
I am not sure how to activate this feature just yet, but that is my next step :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oooooooh fancy!

Copy link
Copy Markdown
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

There's a merge/rebase problem in here.

@needs_xelatex
@pytest.mark.style('default')
@pytest.mark.backend('pgf')
=======
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a problem in this file.

@phobson
Copy link
Copy Markdown
Member Author

phobson commented Mar 24, 2017

@NelleV I forgot that the test_backend_pgf file had been modified in the original PR. I took that out along with the other extraneous whitespace changes

@NelleV
Copy link
Copy Markdown
Member

NelleV commented Mar 24, 2017

Feel free to self-merge once the tests pass. This has been approved already in the previous PR.

@phobson
Copy link
Copy Markdown
Member Author

phobson commented Mar 24, 2017

@NelleV Does this error from the doc build mean anything to you?

/home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.pie:97: ERROR: Error in "rubric" directive:
no content permitted.

.. rubric:: Examples

        .. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py

Building HTML failed.

@NelleV
Copy link
Copy Markdown
Member

NelleV commented Mar 24, 2017

It's an indentation problem. That's all I can say :(

@phobson
Copy link
Copy Markdown
Member Author

phobson commented Mar 24, 2017

Ok, I'll dig into that later

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 24, 2017

The previous PR was never approved, so please don't self-merge.

@phobson
Copy link
Copy Markdown
Member Author

phobson commented Mar 24, 2017

@QuLogic don't worry. wasn't going to after seen that weird "rubric" failure.


self.set_xlim((-1.25 + center[0],
1.25 + center[0]))
1.25 + center[0]))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not indented correctly.

The input array used to make the pie chart.

*explode*: [ *None* | len(x) sequence ]
explode : array-like, optional (default is None)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think our convention has been optional, default: None.

pctdistance : float, optional (default is 0.6)
The ratio between the center of each pie slice and the
start of the text generated by *autopct*. Ignored if
*autopct* is *None*; default is 0.6.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can delete default here.

autotexts : list
A is a list of :class:`~matplotlib.text.Text` instances for the
numeric labels. Is returned only if parameter *autopct* is
not *None*.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Trailing whitespace.

frame=False, rotatelabels=False):
r"""
Plot a pie chart.
r"""Plot a pie chart.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you try reverting this? I think it might fix it. At least it seems to be working locally...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Question: does it even need to be a raw string?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think so, but if everything breaks when you remove the raw string, then it needs to be a raw string :p

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see any backslashes, so maybe not?

@NelleV
Copy link
Copy Markdown
Member

NelleV commented Mar 24, 2017

The indentation problem probably comes from our magic interpolation docstring functions.

@QuLogic QuLogic added this to the 2.0.1 (next bug fix release) milestone Mar 25, 2017
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Mar 25, 2017

Congrats on attaining AppVeyor build 1000.

@QuLogic QuLogic merged commit 199cea7 into matplotlib:master Mar 25, 2017
dstansby pushed a commit that referenced this pull request Mar 25, 2017
DOC: Clean up the pie docstring PR
@dstansby
Copy link
Copy Markdown
Member

Backported to 2.0.x via 5e3df66

@phobson phobson deleted the pie-docstring branch March 26, 2017 15:53
@phobson
Copy link
Copy Markdown
Member Author

phobson commented Mar 26, 2017

@kahnchana thanks for this!

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.

5 participants

X Tutup