DOC: annotate_* plot methods docstrings and implementation need an overhaul #4467
Open
1 of 18 tasks
Labels
api-consistency
naming conventions, code deduplication, informative error messages, code smells...
docs
viz: 2D
Most of these methods support passing arbitrary keyword arguments over some matplotlib API via
**kwargs
. However, their docstrings often doesn't mention exactly where these arguments are passed to, which hurts discoverability, and forces users to inspect the source code we could redirect them to matplotlib's documentation instead.There's also room left to improve API consistency by generalising the
**kwargs
pattern a bit further.I have already started working on this as a side effect of improving some of the annotation methods lately. This issue will help tracking what needs to be done.
VelocityCallback
,MagFieldCallback
,QuiverCallback
andCuttingQuiverCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.quiver.html#matplotlib.axes.Axes.quiverContourCallback
)StreamlineCallback
)LinePlotCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plotClumpContourCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.contour.html#matplotlib.axes.Axes.contourArrowCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.arrow.html#matplotlib.axes.Axes.arrowMarkerAnnotateCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.scatter.html#matplotlib.axes.Axes.scatterMeshLinesCallback
andTriangleFacetsCallback
-> matplotlib.collections.LineCollectionRayCallback
(dispatches toLineCallback
andArrowCallback
)some callbacks accept 2 dicts of arbitrary arguments, one of which could be deprecated in favour of the
**kwargs
patternGridBoundaryCallback
TextLabelCallback
TimestampCallback
ScaleCallback
LineIntegralConvolutionCallback
CellEdgesCallback
SphereCallback
some currently re-expose a subset of args and aren't yet natively extensible using
**kwargs
, which should be changed:ParticleCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.scatter.html#matplotlib.axes.Axes.scatterTitleCallback
-> https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.set_title.html#matplotlib.axes.Axes.set_titleThe text was updated successfully, but these errors were encountered: