class_docstr: Class for fitting the Kaplan-Meier estimate for the survival function.
  
  Parameters
  ----------
  alpha: float, optional (default=0.05)
      The alpha value associated with the confidence intervals.
  label: string, optional
      Provide a new label for the estimate - useful if looking at many groups.
  
  Examples
  --------
  .. code:: python
  
      from lifelines import KaplanMeierFitter
      from lifelines.datasets import load_waltons
      waltons = load_waltons()
  
      kmf = KaplanMeierFitter(label="waltons_data")
      kmf.fit(waltons['T'], waltons['E'])
      kmf.plot()
  
  
  Attributes
  ----------
  survival_function_ : DataFrame
      The estimated survival function (with custom timeline if provided)
  median_survival_time_ : float
      The estimated median time to event. np.inf if doesn't exist.
  confidence_interval_ : DataFrame
      The lower and upper confidence intervals for the survival function. An alias of
      ``confidence_interval_survival_function_``. Uses Greenwood's Exponential formula ("log-log" in R).
  confidence_interval_survival_function_ : DataFrame
      The lower and upper confidence intervals for the survival function. An alias of
      ``confidence_interval_``. Uses Greenwood's Exponential formula ("log-log" in R).
  cumulative_density_ : DataFrame
      The estimated cumulative density function (with custom timeline if provided)
  confidence_interval_cumulative_density_ : DataFrame
      The lower and upper confidence intervals for the cumulative density.
  durations: array
      The durations provided
  event_observed: array
      The event_observed variable provided
  timeline: array
      The time line to use for plotting and indexing
  entry: array or None
      The entry array provided, or None
  event_table: DataFrame
      A summary of the life table
docstr: Plots a pretty figure of the cumulative density function.
  
  Matplotlib plot arguments can be passed in inside the kwargs.
  
  Parameters
  -----------
  show_censors: bool
      place markers at censorship events. Default: False
  censor_styles: bool
      If show_censors, this dictionary will be passed into the plot call.
  ci_alpha: bool
      the transparency level of the confidence interval. Default: 0.3
  ci_force_lines: bool
      force the confidence intervals to be line plots (versus default shaded areas). Default: False
  ci_show: bool
      show confidence intervals. Default: True
  ci_legend: bool
      if ci_force_lines is True, this is a boolean flag to add the lines' labels to the legend. Default: False
  at_risk_counts: bool
      show group sizes at time points. See function ``add_at_risk_counts`` for details. Default: False
  loc: slice
      specify a time-based subsection of the curves to plot, ex:
  
      >>> model.plot(loc=slice(0.,10.))
  
      will plot the time values between t=0. and t=10.
  iloc: slice
      specify a location-based subsection of the curves to plot, ex:
  
      >>> model.plot(iloc=slice(0,10))
  
      will plot the first 10 time points.
  
  Returns
  -------
  ax:
      a pyplot axis object
docstr_tok: ["Plots","a","pretty","figure","of","the","cumulative","density","function",".","Matplotlib","plot","arguments","can","be","passed","in","inside","the","kwargs",".","Parameters","--","--","--","--","--","-","show_censors",":","bool","place","markers","at","censorship","events",".","Default",":","False","censor_styles",":","bool","If","show_censors",",","this","dictionary","will","be","passed","into","the","plot","call",".","ci_alpha",":","bool","the","transparency","level","of","the","confidence","interval",".","Default",":","0.3","ci_force_lines",":","bool","force","the","confidence","intervals","to","be","line","plots","(","versus","default","shaded","areas",")",".","Default",":","False","ci_show",":","bool","show","confidence","intervals",".","Default",":","True","ci_legend",":","bool","if","ci_force_lines","is","True",",","this","is","a","boolean","flag","to","add","the","lines","'","labels","to","the","legend",".","Default",":","False","at_risk_counts",":","bool","show","group","sizes","at","time","points",".","See","function","``","add_at_risk_counts","``","for","details",".","Default",":","False","loc",":","slice","specify","a","time-based","subsection","of","the","curves","to","plot",",","ex",":",">",">",">","model.plot","(","loc=slice","(","0.,10",".",")",")","will","plot","the","time","values","between","t=0",".","and","t=10",".","iloc",":","slice","specify","a","location-based","subsection","of","the","curves","to","plot",",","ex",":",">",">",">","model.plot","(","iloc=slice","(","0,10",")",")","will","plot","the","first","10","time","points",".","Returns","--","--","--","-","ax",":","a","pyplot","axis","object"]
code: def plot_cumulative_density(self, **kwargs):
      """
      Plots a pretty figure of the cumulative density function.
  
      Matplotlib plot arguments can be passed in inside the kwargs.
  
      Parameters
      -----------
      show_censors: bool
          place markers at censorship events. Default: False
      censor_styles: bool
          If show_censors, this dictionary will be passed into the plot call.
      ci_alpha: bool
          the transparency level of the confidence interval. Default: 0.3
      ci_force_lines: bool
          force the confidence intervals to be line plots (versus default shaded areas). Default: False
      ci_show: bool
          show confidence intervals. Default: True
      ci_legend: bool
          if ci_force_lines is True, this is a boolean flag to add the lines' labels to the legend. Default: False
      at_risk_counts: bool
          show group sizes at time points. See function ``add_at_risk_counts`` for details. Default: False
      loc: slice
          specify a time-based subsection of the curves to plot, ex:
  
          >>> model.plot(loc=slice(0.,10.))
  
          will plot the time values between t=0. and t=10.
      iloc: slice
          specify a location-based subsection of the curves to plot, ex:
  
          >>> model.plot(iloc=slice(0,10))
  
          will plot the first 10 time points.
  
      Returns
      -------
      ax:
          a pyplot axis object
      """
      if not CensoringType.is_interval_censoring(self):
          return _plot_estimate(
              self, estimate="cumulative_density_", **kwargs
          )
      else:
          # hack for now.
          color = coalesce(kwargs.get("c"), kwargs.get("color"), "k")
          self.cumulative_density_.plot(
              drawstyle="steps", color=color, **kwargs
          )
  
imports: from __future__ import annotations
  import warnings
  import numpy
  import pandas
  import typing
  from lifelines.fitters import NonParametricUnivariateFitter
  from lifelines.exceptions import StatError, StatisticalWarning
  from lifelines.utils import _preprocess_inputs, _additive_estimate, _to_1d_array, inv_normal_cdf, median_survival_times, qth_survival_time, check_nans_or_infs, coalesce, CensoringType, pass_for_numeric_dtypes_or_raise_array, check_nans_or_infs
  from lifelines.plotting import loglogs_plot, _plot_estimate
  from lifelines.fitters.npmle import npmle, reconstruct_survival_function, npmle_compute_confidence_intervals
label_desc: Use image node_id 12 for calling the KaplanMeierFitter obj's underlying member method code with example usage: obj.plot_cumulative_density() and returns: _plot_estimate