Skip to content

Commit

Permalink
removed inversion of plotting lifetimes (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpolimenov authored and CamDavidsonPilon committed Mar 19, 2019
1 parent d89655a commit 53ec5a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lifelines/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ def plot_lifetimes(

for i in range(N):
c = event_observed_color if event_observed[i] else event_censored_color
ax.hlines(N - 1 - i, entry[i], entry[i] + durations[i], color=c, lw=1.5)
ax.hlines(i, entry[i], entry[i] + durations[i], color=c, lw=1.5)
if left_truncated:
ax.hlines(N - 1 - i, 0, entry[i], color=c, lw=1.0, linestyle="--")
ax.hlines(i, 0, entry[i], color=c, lw=1.0, linestyle="--")
m = "" if not event_observed[i] else "o"
ax.scatter(entry[i] + durations[i], N - 1 - i, color=c, marker=m, s=10)
ax.scatter(entry[i] + durations[i], i, color=c, marker=m, s=10)

ax.set_ylim(-0.5, N)
return ax
Expand Down

0 comments on commit 53ec5a5

Please sign in to comment.