@@ -350,19 +350,19 @@ An example docstring looks like:
350
350
Respective beginning and end of each line. If scalars are
351
351
provided, all lines will have the same length.
352
352
353
- colors : array-like of colors, optional, default: 'k'
353
+ colors : array-like of colors, default: 'k'
354
354
355
- linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
355
+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
356
356
357
- label : string, optional , default: ''
357
+ label : str , default: ''
358
358
359
359
Returns
360
360
-------
361
361
lines : `~matplotlib.collections.LineCollection`
362
362
363
363
Other Parameters
364
364
----------------
365
- **kwargs : `~matplotlib.collections.LineCollection` properties.
365
+ **kwargs : `~matplotlib.collections.LineCollection` properties
366
366
367
367
See also
368
368
--------
@@ -420,9 +420,17 @@ precisely in the text.
420
420
Generally, the `numpydoc docstring guide `_ conventions apply. The following
421
421
rules expand on them where the numpydoc conventions are not specific.
422
422
423
+ As opposed to the numpydoc guide, parameters need not be marked as
424
+ *optional *. This removes unnecessary clutter. The optional aspect is already
425
+ clear from the presence of a default parameter (visible in the signature or
426
+ expicit in the docstring). *optional * may be scarcely used when this
427
+ information is not available in the context of the docstring (e.g. when
428
+ it's hidden behind ``*args `` or ``*kwargs ``).
429
+
423
430
Use ``float `` for a type that can be any number.
424
431
425
- Use ``(float, float) `` to describe a 2D position.
432
+ Use ``(float, float) `` to describe a 2D position. The parentheses should be
433
+ included to make the tuple-ness more obvious.
426
434
427
435
Use ``array-like `` for homogeneous numeric sequences, which could
428
436
typically be a numpy.array. Dimensionality may be specified using ``2D ``,
@@ -460,7 +468,7 @@ Use abbreviated links ```.Normalize``` in the text.
460
468
461
469
.. code-block :: rst
462
470
463
- norm : `~matplotlib.colors.Normalize`, optional
471
+ norm : `~matplotlib.colors.Normalize`
464
472
A `.Normalize` instance is used to scale luminance data to 0, 1.
465
473
466
474
``See also `` sections
@@ -489,7 +497,7 @@ result in a lot of whitespace within the line):
489
497
Parameters
490
498
----------
491
499
projection : {'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', \
492
- 'rectilinear'}, optional
500
+ 'rectilinear'}
493
501
The projection type of the axes.
494
502
495
503
...
0 commit comments