code: def plot_values_2d(sweeps, names, metric_pairs):
      """Plots color-coded scatter plot for each metric_pair and sweep."""
      m, n = len(metric_pairs), len(sweeps)
      fig, axes = fig_make(m, n, False, sharex="row", sharey="row")
      for i, j in [(i, j) for i in range(m) for j in range(n)]:
          sweep, ax = sweeps[j], axes[i][j]
          metric_x, metric_y = metric_pairs[i]
          xs = get_vals(sweep, metric_x)
          ys = get_vals(sweep, metric_y)
          errs = get_vals(sweep, "error")
          ranks = (np.argsort(np.argsort(errs)) + 1) / len(errs)
          s = ax.scatter(xs, ys, c=ranks, alpha=0.6)
          ax.set_xlabel(get_info(metric_x)[1], fontsize=12)
          ax.set_ylabel(get_info(metric_y)[1], fontsize=12)
          fig.colorbar(s, ax=ax) if j == n - 1 else ()
      fig_legend(fig, n, names)
      return fig
  
file_path: pycls/pycls/sweep/plotting.py
imports: import matplotlib.lines
  import matplotlib.pyplot
  import matplotlib.ticker
  import numpy
  import pycls.models.regnet
  from pycls.sweep.analysis import get_info, get_vals, sort_sweep
label_desc: Use image node_id 9 for calling a global function with example usage: plot_values_2d(sweeps, names, metric_pairs) and returns: fig