File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ pandas 0.9.0
148
148
- Fix resampling error with intraday times and anchored target time (like
149
149
AS-DEC) (#1772)
150
150
- Fix .ix indexing bugs with mixed-integer indexes (#1799)
151
+ - Respect passed color keyword argument in Series.plot (#1890)
151
152
152
153
pandas 0.8.1
153
154
============
Original file line number Diff line number Diff line change @@ -479,6 +479,16 @@ def test_boxplot(self):
479
479
_check_plot_works (grouped .boxplot )
480
480
_check_plot_works (grouped .boxplot , subplots = False )
481
481
482
+ @slow
483
+ def test_series_plot_color_kwargs (self ):
484
+ # #1890
485
+ import matplotlib .pyplot as plt
486
+
487
+ plt .close ('all' )
488
+ ax = Series (np .arange (12 ) + 1 ).plot (color = 'green' )
489
+ line = ax .get_lines ()[0 ]
490
+ self .assert_ (line .get_color () == 'green' )
491
+
482
492
PNG_PATH = 'tmp.png'
483
493
484
494
def _check_plot_works (f , * args , ** kwargs ):
Original file line number Diff line number Diff line change @@ -889,7 +889,8 @@ def _make_plot(self):
889
889
has_colors , colors = self ._get_colors ()
890
890
def _maybe_add_color (kwargs , style , i ):
891
891
if (not has_colors and
892
- (style is None or re .match ('[a-z]+' , style ) is None )):
892
+ (style is None or re .match ('[a-z]+' , style ) is None )
893
+ and 'color' not in kwargs ):
893
894
kwargs ['color' ] = colors [i % len (colors )]
894
895
895
896
plotf = self ._get_plot_function ()
You can’t perform that action at this time.
0 commit comments