rte-france / relife

ReLife is an open source Python library for asset management based on reliability theory and lifetime data analysis.
Apache License 2.0
17 stars 2 forks source link

Issue when specifying a label name for ECDF plots #7

Open figolus opened 2 years ago

figolus commented 2 years ago

Should allow to customized label names when plotting ECDF:

# Import load_circuit_breaker function from relife.dataset
from relife import *
from relife.datasets import load_circuit_breaker 

# Assign time, event variables from dataset
time, event = load_circuit_breaker().astuple()[:-1]

# Get only time values for observed event
time1 = time[event==1]

# Fit ECDF estimator to time1
ecdf = ECDF().fit(time1)

# Plot ECDF estimator of F and 1-F
ecdf.plot(label='custom_label')

returns error: TypeError: plot() got multiple values for keyword argument 'label'