Skip to content

Commit

Permalink
fix plotting bug introduced
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Nov 8, 2016
1 parent e2b6bc6 commit bbaf136
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lifelines/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ def set_kwargs_color(kwargs):
import matplotlib as mpl
major_version, minor_version = mpl.__version__.split('.')[:2]
if int(major_version) == 1 and int(minor_version) < 5:
# https://github.com/CamDavidsonPilon/lifelines/issues/191#issuecomment-145275656
raise ValueError('Matplotlib versions less than 1.5 no longer supported.')
elif int(major_version) == 2:
kwargs['color'] = coalesce(kwargs.get('c'), kwargs.get('color'),
next(kwargs["ax"]._get_lines.color_cycle)['color'])
kwargs["ax"]._get_lines.get_next_color())
else:
kwargs['color'] = coalesce(kwargs.get('c'), kwargs.get('color'),
kwargs["ax"]._get_lines.get_next_color())
next(kwargs["ax"]._get_lines.prop_cycler)['color'])


def set_kwargs_drawstyle(kwargs):
Expand Down
2 changes: 1 addition & 1 deletion lifelines/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import unicode_literals

__version__ = '0.9.3.1'
__version__ = '0.9.3.2'

0 comments on commit bbaf136

Please sign in to comment.