From fe39d3cf08560ea57ae9e98d7fe3ff03dff4a7f6 Mon Sep 17 00:00:00 2001 From: David BROCHART Date: Tue, 17 Mar 2015 16:24:21 +0100 Subject: [PATCH] Fix for issue #9671 --- pandas/tools/plotting.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pandas/tools/plotting.py b/pandas/tools/plotting.py index cf9c890823f8f..fc4530450d629 100644 --- a/pandas/tools/plotting.py +++ b/pandas/tools/plotting.py @@ -871,12 +871,17 @@ def _validate_color_args(self): "simultaneously. Using 'color'") if 'color' in self.kwds and self.style is not None: + if com.is_list_like(self.style): + styles = self.style + else: + styles = [self.style] # need only a single match - if re.match('^[a-z]+?', self.style) is not None: - raise ValueError("Cannot pass 'style' string with a color " - "symbol and 'color' keyword argument. Please" - " use one or the other or pass 'style' " - "without a color symbol") + for s in styles: + if re.match('^[a-z]+?', s) is not None: + raise ValueError("Cannot pass 'style' string with a color " + "symbol and 'color' keyword argument. Please" + " use one or the other or pass 'style' " + "without a color symbol") def _iter_data(self, data=None, keep_index=False, fillna=None): if data is None: