Skip to content
Prev Previous commit
Next Next commit
BUG: Chore Conditional block
  • Loading branch information
AntiKnot committed Aug 22, 2024
commit da34d4691805e9d2f7d0f394fb085fd46ff733fc
6 changes: 3 additions & 3 deletions pandas/plotting/_matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,12 @@ def _validate_color_args(self, color, colormap):
)

if self.style is not None:
if is_list_like(self.style):
if isinstance(self.style, dict):
styles = [self.style[col] for col in self.columns if col in self.style]
elif is_list_like(self.style):
styles = self.style
else:
styles = [self.style]
if isinstance(self.style, dict):
styles = [self.style[col] for col in self.columns if col in self.style]
# need only a single match
for s in styles:
if _color_in_style(s):
Expand Down