@@ -350,19 +350,19 @@ An example docstring looks like:
350350 Respective beginning and end of each line. If scalars are
351351 provided, all lines will have the same length.
352352
353- colors : array-like of colors, optional, default: 'k'
353+ colors : array-like of colors, default: 'k'
354354
355- linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
355+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
356356
357- label : string, optional , default: ''
357+ label : str , default: ''
358358
359359 Returns
360360 -------
361361 lines : `~matplotlib.collections.LineCollection`
362362
363363 Other Parameters
364364 ----------------
365- **kwargs : `~matplotlib.collections.LineCollection` properties.
365+ **kwargs : `~matplotlib.collections.LineCollection` properties
366366
367367 See also
368368 --------
@@ -420,9 +420,19 @@ precisely in the text.
420420Generally, the `numpydoc docstring guide `_ conventions apply. The following
421421rules expand on them where the numpydoc conventions are not specific.
422422
423+ As opposed to the numpydoc guide, parameters need not be marked as
424+ *optional * if they have a simple default. This removes unnecessary clutter.
425+ The optional aspect is already clear from the presence of a default value.
426+ More specifically
427+
428+ - use `{name} : {type}, default: {val} ` when possible.
429+ - use `{name} : {type}, optional ` and describe the default in the text if
430+ in cannot be explained sufficiently in the above way.
431+
423432Use ``float `` for a type that can be any number.
424433
425- Use ``(float, float) `` to describe a 2D position.
434+ Use ``(float, float) `` to describe a 2D position. The parentheses should be
435+ included to make the tuple-ness more obvious.
426436
427437Use ``array-like `` for homogeneous numeric sequences, which could
428438typically be a numpy.array. Dimensionality may be specified using ``2D ``,
0 commit comments