@@ -2340,33 +2340,53 @@ def barh(self, *args, **kwargs):
2340
2340
@docstring .dedent_interpd
2341
2341
def broken_barh (self , xranges , yrange , ** kwargs ):
2342
2342
"""
2343
- Plot horizontal bars .
2343
+ Plot a horizontal sequence of rectangles .
2344
2344
2345
- A collection of horizontal bars spanning *yrange* with a sequence of
2346
- *xranges *.
2345
+ A rectangle is drawn for each element of *xranges*. All rectangles
2346
+ have the same vertical position and size defined by *yrange *.
2347
2347
2348
- Required arguments:
2348
+ This is a convenience function for instantiating a
2349
+ `.BrokenBarHCollection`, adding it to the axes and autoscaling the
2350
+ view.
2349
2351
2350
- ========= ==============================
2351
- Argument Description
2352
- ========= ==============================
2353
- *xranges* sequence of (*xmin*, *xwidth*)
2354
- *yrange* sequence of (*ymin*, *ywidth*)
2355
- ========= ==============================
2352
+ Parameters
2353
+ ----------
2354
+ xranges : sequence of tuples (*xmin*, *xwidth*)
2355
+ The x-positions and extends of the rectangles. For each tuple
2356
+ (*xmin*, *xwidth*) a rectangle is drawn from *xmin* to *xmin* +
2357
+ *xwidth*.
2358
+ yranges : (*ymin*, *ymax*)
2359
+ The y-position and extend for all the rectangles.
2356
2360
2357
- kwargs are
2358
- :class:`matplotlib.collections.BrokenBarHCollection`
2359
- properties:
2361
+ Other Parameters
2362
+ ----------------
2363
+ **kwargs : :class:`~.BrokenBarHCollection` properties
2364
+
2365
+ Each *kwarg* can be either a single argument applying to all
2366
+ rectangles, e.g.::
2367
+
2368
+ facecolors='black'
2360
2369
2361
- %(BrokenBarHCollection)s
2370
+ or a sequence of arguments over which is cycled, e.g.::
2362
2371
2363
- these can either be a single argument, i.e.,::
2372
+ facecolors=('black', 'blue')
2364
2373
2365
- facecolors = ' black'
2374
+ would create interleaving black and blue rectangles.
2366
2375
2367
- or a sequence of arguments for the various bars, i.e.,::
2376
+ Supported keywords:
2377
+
2378
+ %(BrokenBarHCollection)s
2379
+
2380
+ Returns
2381
+ -------
2382
+ :class:`matplotlib.collections.BrokenBarHCollection`
2383
+
2384
+ Notes
2385
+ -----
2386
+ ..
2387
+ [Empty notes is a workaround to prevent the data note from being
2388
+ injected into the Returns section.]
2368
2389
2369
- facecolors = ('black', 'red', 'green')
2370
2390
"""
2371
2391
# process the unit information
2372
2392
if len (xranges ):
0 commit comments