You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Review documentation of Axes plotting methods #10148
As a follow up of #7205, some docstrings of the basic Axes plotting methods could need a bit care. In particular:
Conversion to numpydoc format.
Improvements on the descriptions.
I intend to go through the methods and update their docs. This is a summary issue to keep track of my progress:
Basic
Axes.plot
Axes.errorbar
Axes.scatter
Axes.plot_date
Axes.step
Axes.loglog
Axes.semilogx
Axes.semilogy
Axes.fill_between
Axes.fill_betweenx
Axes.bar
Axes.barh
Axes.stem
Axes.eventplot
Axes.pie
Axes.stackplot
Axes.broken_barh
Axes.vlines
Axes.hlines
Axes.fill
Spans
Axes.axhline
Axes.axhspan
Axes.axvline
Axes.axvspan
Spectral
Axes.acorr
Axes.angle_spectrum
Axes.cohere
Axes.csd
Axes.magnitude_spectrum
Axes.phase_spectrum
Axes.psd
Axes.specgram
Axes.xcorr
Statistics
Axes.boxplot
Axes.violinplot
Axes.violin
Axes.bxp
Binned
Axes.hexbin
Axes.hist
Axes.hist2d
Contours
Axes.clabel
Axes.contour
Axes.contourf
Array
Axes.imshow
Axes.matshow
Axes.pcolor
Axes.pcolorfast
Axes.pcolormesh
Axes.spy
Unstructured triangles
Axes.tripcolor
Axes.triplot
Axes.tricontour
Axes.tricontourf
Text and Annotations
Axes.annotate
Axes.text
Axes.table
Axes.arrow
Fields
Axes.barbs
Axes.quiver
Axes.quiverkey
Axes.streamplot
Axes limits and direction
Axes.invert_xaxis
Axes.xaxis_inverted
Axes.invert_yaxis
Axes.yaxis_inverted
Axes.set_xlim
Axes.get_xlim
Axes.set_ylim
Axes.get_ylim
Axes.update_datalim
Axes.update_datalim_bounds
Axes.set_xbound
Axes.get_xbound
Axes.set_ybound
Axes.get_ybound
Axes scales
Axes.get_xscale
Axes.set_xscale
Axes.get_yscale
Axes.set_yscale
Note: I currently update the docstrings in my private branch https://github.com/timhoffm/matplotlib/tree/axes-plotting-docstrings and will provide a pull request once I'm done. I think this is better than opening a separate pull request for every change. Please let me know, in case you'd rather prefer many smaller PRs.
The fixes will be supplied in a series of PRs referencing this issue.
I think the only disadvantage to a big PR is you may have to privately rebase a bunch, and other folks might make conflicting changes if it takes you a while.
I would probably make PR with small batches of related methods, but one-at-a-time is fine too.
A giant PR is also fine as long as you don't mind an unbounded (in time...) review process.
I think it would be really great if the documentation of a function could link to some (or all?) examples from the gallery that use this function.
I don't know at which point this would be specified, if it's in the docstring or some sphinx config file?
Also linking from the examples to the docs is only present in some cases.
BTW, I like the doc interpolation, but not when someone has named the doscstring something unsearchable like Patch. Does anyone know where the Patch docstring lives that is interpolated via %(Patch)s?
Activity
jklymak commentedon Jan 3, 2018
I think the only disadvantage to a big PR is you may have to privately rebase a bunch, and other folks might make conflicting changes if it takes you a while.
anntzer commentedon Jan 3, 2018
I would probably make PR with small batches of related methods, but one-at-a-time is fine too.
A giant PR is also fine as long as you don't mind an unbounded (in time...) review process.
timhoffm commentedon Jan 3, 2018
Thanks for the answers. I'll switch to smaller batches then.
ImportanceOfBeingErnest commentedon Apr 6, 2018
I think it would be really great if the documentation of a function could link to some (or all?) examples from the gallery that use this function.
I don't know at which point this would be specified, if it's in the docstring or some sphinx config file?
Also linking from the examples to the docs is only present in some cases.
jklymak commentedon Apr 6, 2018
There is some of that on a few of the pages: https://matplotlib.org/api/_as_gen/matplotlib.patches.Wedge.html#matplotlib.patches.Wedge
I have no idea from looking at the source how that happens, however.
jklymak commentedon Apr 6, 2018
BTW, I like the doc interpolation, but not when someone has named the doscstring something unsearchable like
Patch. Does anyone know where thePatchdocstring lives that is interpolated via%(Patch)s?jklymak commentedon Apr 6, 2018
... or is it just auto-generating from the
set_andget_?ImportanceOfBeingErnest commentedon Apr 6, 2018
Yeah, that's exactly what I mean.
In the page source it says
but the question is indeed who is reponsible for putting that line there?
The
%(Patch)sseems to come frommatplotlib/lib/matplotlib/patches.py
Lines 551 to 558 in d54e2e3
Which then points to
matplotlib/lib/matplotlib/artist.py
Line 1466 in d54e2e3
and that seems to indeed give the setters from the classes. But I don't think it will help with creating the examples, or will it?
jklymak commentedon Apr 6, 2018
Opening new issue
timhoffm commentedon Apr 6, 2018
I'm explicitly excluding work on gallery links from this effort. It's already big enough as it is now. The gallery links have their own ticket #10974.
Improve docstring of triplot() and PatchCollection
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
2 remaining items
Improve docstring of triplot() and PatchCollection
Rework tricontour and tricontourf documentation
Improve docstring of triplot() and PatchCollection
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation
Rework tricontour and tricontourf documentation