@@ -465,17 +465,25 @@ def plot(x, y, my_options={}, y2=None):
465
465
axes [0 ].axvline (l , ** options .vertical_lines .options .toDict ())
466
466
467
467
if options .vertical_shaded .limits :
468
- for l , r in options .vertical_shaded .limits :
469
- axes [0 ].axvspan (l , r , ** options .vertical_shaded .options .toDict ())
468
+ for vs in options .vertical_shaded .limits :
469
+ l , r = vs [:2 ]
470
+ o = options .vertical_shaded .options .toDict ()
471
+ if len (vs ) > 2 :
472
+ o = vs [2 ].toDict ()
473
+ axes [0 ].axvspan (l , r , ** o )
470
474
471
475
if options .horizontal_lines .lines :
472
476
for l in options .horizontal_lines .lines :
473
477
axes [0 ].axhline (l , ** options .horizontal_lines .options .toDict ())
474
478
475
479
if options .horizontal_shaded .limits :
476
- for l , r in options .horizontal_shaded .limits :
477
- axes [0 ].axhspan (l , r , ** options .horizontal_shaded .options .toDict ())
478
-
480
+ for hs in options .horizontal_shaded .limits :
481
+ l , r = hs [:2 ]
482
+ o = options .horizontal_shaded .options .toDict ()
483
+ if len (hs ) > 2 :
484
+ o = hs [2 ].toDict ()
485
+ axes [0 ].axhspan (l , r , ** o )
486
+
479
487
for i in xrange (len (options .text .labels )):
480
488
axes [- 1 ].text (* options .text .positions [i ], s = options .text .labels [i ],
481
489
transform = axes [0 ].transAxes ,
0 commit comments