79349152

Date: 2025-01-12 00:38:46
Score: 0.5
Natty:
Report link

I believe I have it figured out:

def plot2(scores, mean_scores, times, mean_times):
  display.clear_output(wait=True)
  display.display(plt.gcf())
  plt.clf()
  plt.title('Some Titile')
  plt.xlabel('Number of games')
  plt.ylabel('Score')
  ax1 = plt.gca()
  ax2 = ax1.twinx()
  ax2.plot(times)
  ax2.plot(mean_times)
  ax2.set_ylabel('Game Time')
  plt.plot(scores)
  plt.plot(mean_scores)
  plt.ylim(ymin=0)
  plt.text(len(scores)-1, scores[-1], str(scores[-1]))
  plt.text(len(mean_scores)-1, mean_scores[-1], str(mean_scores[-1]))

  plt.show()
  plt.pause(0.1)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Nadim Ghaznavi