code: def plot_performance_profiles(
      performance_profiles,
      tau_list,
      performance_profile_cis=None,
      use_non_linear_scaling=False,
      ax=None,
      colors=None,
      color_palette="colorblind",
      alpha=0.15,
      figsize=(10, 5),
      xticks=None,
      yticks=None,
      xlabel=r"Normalized Score ($\tau$)",
      ylabel=r"Fraction of runs with score $> \tau$",
      linestyles=None,
      **kwargs,
  ):
      """Plots performance profiles with stratified confidence intervals.
  
      Args:
        performance_profiles: A dictionary mapping a method to its performance
          profile, where each profile is computed using thresholds in `tau_list`.
        tau_list: List or 1D numpy array of threshold values on which the profile is
          evaluated.
        performance_profile_cis: The confidence intervals (default 95%) of
          performance profiles evaluated at all threshdolds in `tau_list`.
        use_non_linear_scaling: Whether to scale the x-axis in proportion to the
          number of runs within any specified range.
        ax: `matplotlib.axes` object.
        colors: Maps each method to a color. If None, then this mapping is created
          based on `color_palette`.
        color_palette: `seaborn.color_palette` object. Used when `colors` is None.
        alpha: Changes the transparency of the shaded regions corresponding to the
          confidence intervals.
        figsize: Size of the figure passed to `matplotlib.subplots`. Only used when
          `ax` is None.
        xticks: The list of x-axis tick locations. Passing an empty list removes all
          xticks.
        yticks: The list of y-axis tick locations between 0 and 1. If None, defaults
          to `[0, 0.25, 0.5, 0.75, 1.0]`.
        xlabel: Label for the x-axis.
        ylabel: Label for the y-axis.
        linestyles: Maps each method to a linestyle. If None, then the 'solid'
          linestyle is used for all methods.
        **kwargs: Arbitrary keyword arguments for annotating and decorating the
          figure. For valid arguments, refer to `_annotate_and_decorate_axis`.
  
      Returns:
        `matplotlib.axes.Axes` object used for plotting.
      """
  
      if ax is None:
          _, ax = plt.subplots(figsize=figsize)
  
      if colors is None:
          keys = performance_profiles.keys()
          color_palette = sns.color_palette(
              color_palette, n_colors=len(keys)
          )
          colors = dict(zip(list(keys), color_palette))
  
      if linestyles is None:
          linestyles = {
              key: "solid" for key in performance_profiles.keys()
          }
  
      if use_non_linear_scaling:
          tau_list, xticks, xticklabels = _non_linear_scaling(
              performance_profiles, tau_list, xticks
          )
      else:
          xticklabels = xticks
  
      for method, profile in performance_profiles.items():
          ax.plot(
              tau_list,
              profile,
              color=colors[method],
              linestyle=linestyles[method],
              linewidth=kwargs.pop("linewidth", 2.0),
              label=method,
          )
          if performance_profile_cis is not None:
              if method in performance_profile_cis:
                  lower_ci, upper_ci = performance_profile_cis[method]
                  ax.fill_between(
                      tau_list,
                      lower_ci,
                      upper_ci,
                      color=colors[method],
                      alpha=alpha,
                  )
  
      if yticks is None:
          yticks = [0.0, 0.25, 0.5, 0.75, 1.0]
      return _annotate_and_decorate_axis(
          ax,
          xticks=xticks,
          yticks=yticks,
          xticklabels=xticklabels,
          xlabel=xlabel,
          ylabel=ylabel,
          **kwargs,
      )
  
file_path: rliable/rliable/plot_utils.py
imports: import matplotlib.pyplot
  import numpy
  import seaborn
label_desc: Use image node_id 4 for calling a global function with example usage: plot_performance_profiles(performance_profiles, tau_list, performance_profile_cis, use_non_linear_scaling, ax, colors, color_palette, alpha, figsize, xticks, yticks, xlabel, ylabel, linestyles) and returns: _annotate_and_decorate_axis