code: def plot_curve(dataset, model, metric, cmap=benchmark_color_map):
      experiments = run_experiments(
          dataset=dataset, model=model, metric=metric
      )
      pl.figure()
      method_arr = []
      for name, (fcounts, scores) in experiments:
          _, _, method, _ = name
          transform = get_metric_attr(metric, "transform")
          if transform == "negate":
              scores = -scores
          elif transform == "one_minus":
              scores = 1 - scores
          auc = sklearn.metrics.auc(fcounts, scores) / fcounts[-1]
          method_arr.append((auc, method, scores))
      for auc, method, scores in sorted(method_arr):
          method_title = (
              getattr(methods, method).__doc__.split("\n")[0].strip()
          )
          label = f"{auc:6.3f} - " + method_title
          pl.plot(
              fcounts / fcounts[-1],
              scores,
              label=label,
              color=get_method_color(method),
              linewidth=2,
              linestyle=get_method_linestyle(method),
          )
      metric_title = (
          getattr(metrics, metric).__doc__.split("\n")[0].strip()
      )
      pl.xlabel(get_metric_attr(metric, "xlabel"))
      pl.ylabel(get_metric_attr(metric, "ylabel"))
      model_title = (
          getattr(models, dataset + "__" + model)
          .__doc__.split("\n")[0]
          .strip()
      )
      pl.title(metric_title + " - " + model_title)
      pl.gca().xaxis.set_ticks_position("bottom")
      pl.gca().yaxis.set_ticks_position("left")
      pl.gca().spines["right"].set_visible(False)
      pl.gca().spines["top"].set_visible(False)
      ahandles, alabels = pl.gca().get_legend_handles_labels()
      pl.legend(reversed(ahandles), reversed(alabels))
      return pl.gcf()
  
file_path: shap/shap/benchmark/plots.py
imports: import base64
  import io
  import os
  import numpy
  import sklearn
  from matplotlib.colors import LinearSegmentedColormap
  from ..None import __version__
  from ..plots import colors
  from .None import methods, metrics, models
  from .experiments import run_experiments
label_desc: Use image node_id 4 for calling a global function with example usage: plot_curve(dataset, model, metric, cmap) and returns: pl