code: def plotMultipleInferenceRun(stats,
                         fields,
                         basename,
                         plotDir="plots"):
    
    if not os.path.exists(plotDir):
      os.makedirs(plotDir)
  
    plt.figure()
  
    colorList = ['r', 'b', 'g', 'm', 'c', 'k', 'y']
  
    # plot request stats
    for i, field in enumerate(fields):
      fieldKey = field[0] + " C0"
      trace = []
      for s in stats:
        trace += s[fieldKey]
      plt.plot(trace, label=field[1], color=colorList[i])
  
    # format
    plt.legend(loc="upper right")
    plt.xlabel("Input number")
    plt.xticks(range(0, len(stats)*stats[0]["numSteps"]+1,5))
    plt.ylabel("Number of cells")
    plt.ylim(-5, 55)
    plt.title("Inferring combined sensorimotor and temporal sequence stream")
  
    # save
    relPath = "{}_exp_combined.pdf".format(basename)
    path = os.path.join(plotDir, relPath)
    plt.savefig(path)
    plt.close()
docs: Plots individual inference runs.