code: def plot_results(dirs, num_timesteps, xaxis, task_name):
      """
      plot the results
  
      :param dirs: ([str]) the save location of the results to plot
      :param num_timesteps: (int or None) only plot the points below this value
      :param xaxis: (str) the axis for the x and y output
          (can be X_TIMESTEPS='timesteps', X_EPISODES='episodes' or X_WALLTIME='walltime_hrs')
      :param task_name: (str) the title of the task to plot
      """
  
      tslist = []
      for folder in dirs:
          timesteps = load_results(folder)
          if num_timesteps is not None:
              timesteps = timesteps[
                  timesteps.l.cumsum() <= num_timesteps
              ]
          tslist.append(timesteps)
      xy_list = [
          ts2xy(timesteps_item, xaxis) for timesteps_item in tslist
      ]
      plot_curves(xy_list, xaxis, task_name)
  
file_path: stable-baselines/stable_baselines/results_plotter.py
imports: import numpy
  import matplotlib
  import matplotlib.pyplot
  from stable_baselines.bench.monitor import load_results
label_desc: Use image node_id 5 for calling a global function with example usage: plot_results(dirs, num_timesteps, xaxis, task_name) without return types