@@ -2392,27 +2392,78 @@ def broken_barh(self, xranges, yrange, **kwargs):
2392
2392
@_preprocess_data (replace_all_args = True , label_namer = None )
2393
2393
def stem (self , * args , ** kwargs ):
2394
2394
"""
2395
+ stem(*args, linefmt=None, markerfmt=None, basefmt=None, data=None,
2396
+ bottom=0, label=None)
2397
+
2395
2398
Create a stem plot.
2396
2399
2397
2400
Call signatures::
2398
2401
2399
- stem(y, linefmt='b-', markerfmt='bo', basefmt='r-')
2400
- stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
2402
+ stem(y)
2403
+ stem(x, y)
2404
+
2405
+ A stem plot plots vertical lines at each *x* location from the baseline
2406
+ to *y*, and places a marker there.
2407
+
2408
+
2409
+ Parameters
2410
+ ----------
2411
+ x : array-like, optional
2412
+ The x-positions of the stems. Default: (0, 1, ..., len(y) - 1).
2413
+
2414
+ y : array-like
2415
+ The y-values of the stem heads.
2416
+
2417
+ linefmt : str, optional
2418
+ A string defining the properties of the vertical lines. Usually,
2419
+ this will be a color or a color and a linestyle:
2420
+
2421
+ ========= =============
2422
+ Character Line Style
2423
+ ========= =============
2424
+ ``'-'`` solid line
2425
+ ``'--'`` dashed line
2426
+ ``'-.'`` dash-dot line
2427
+ ``':'`` dotted line
2428
+ ========= =============
2429
+
2430
+ Default: 'C0-', i.e. solid line with the first color of the color
2431
+ cycle.
2401
2432
2402
- A stem plot plots vertical lines (using *linefmt*) at each *x*
2403
- location from the baseline to *y*, and places a marker there
2404
- using *markerfmt*. A horizontal line at 0 is plotted using
2405
- *basefmt*.
2433
+ Note: While it is technically possible to specify valid formats
2434
+ other than color or color and linestyle (e.g. 'rx' or '-.'), this
2435
+ is beyond the intention of the method and will most likely not
2436
+ result in a reasonable reasonable plot.
2437
+
2438
+ markerfmt : str, optional
2439
+ A string defining the properties of the markers at the stem heads.
2440
+ Default: 'C0o', i.e. filled circles with the first color of the
2441
+ color cycle.
2442
+
2443
+ basefmt : str, optional
2444
+ A format string defining the properties of the baseline.
2445
+
2446
+ Default: 'C3-' ('C2-' in classic mode).
2447
+
2448
+ bottom : float, optional, default: 0
2449
+ The y-position of the baseline.
2450
+
2451
+ label : str, optional, default: None
2452
+ The label to use for the stems in legends.
2453
+
2454
+
2455
+ Returns
2456
+ -------
2457
+ a :class:`~matplotlib.container.StemContainer`
2406
2458
2407
- If no *x* values are provided, the default is (0, 1, ..., len(y) - 1)
2459
+ The stemcontainer may be treated like a tuple
2460
+ (*markerline*, *stemlines*, *baseline*)
2408
2461
2409
- Return value is a tuple (*markerline*, *stemlines*,
2410
- *baseline*). See :class:`~matplotlib.container.StemContainer`
2411
2462
2412
2463
.. seealso::
2413
- This
2414
- `document <http://www.mathworks.com/help/techdoc/ref/stem.html>`_
2415
- for details .
2464
+ The MATLAB function
2465
+ `stem <http://www.mathworks.com/help/techdoc/ref/stem.html>`_
2466
+ which inspired this method .
2416
2467
2417
2468
"""
2418
2469
remember_hold = self ._hold
0 commit comments