docs: def plot_distances(self, mean_dist, distances, indeces):
          '''Plot distances of the generated spirographs w.r.t. the previously
          generated spirogaphs.
          '''
          from matplotlib import pyplot as plt
          x = np.arange(len(distances))
          y = [mean_dist for i in x]
          fig, ax = plt.subplots()
          data_line = ax.plot(indeces, distances, label='Min Distance to previous',
                          marker='.', color='black', linestyle="")
          mean_line = ax.plot(indeces, y, label='Mean', linestyle='--', color='green')
          if len(distances) > 0:
              z = np.poly1d(np.polyfit(x,distances,2))
              f = [z(i) for i in x]
              mean_line = ax.plot(indeces, f, label='Fitted', linestyle='-', color='red')
          legend = ax.legend(loc='upper right', prop={'size':8})
          agent_vars = "{}_{}_{}{}_last={}_stmem=list{}_veto={}_sc={}_jump={}_sw={}_mr={}_maxN".format(
              self.sanitized_name(), self.age, self.env_learning_method, self.env_learning_amount, self.env_learn_on_add,
              self.stmem.length, self._novelty_threshold, self._own_threshold,
              self.jump, self.search_width, self.move_radius)
          ax.set_title("{} min distances: env_learn={} {}"
                       .format(self.name, self.env_learning_method,
                               self.env_learning_amount))
          ax.set_ylabel('min distance to preceding artifact')
          ax.set_xlabel('iteration')
          if self.logger is not None:
              imname = os.path.join(self.logger.folder, '{}_dists.png'.format(agent_vars))
              plt.savefig(imname)
              plt.close()
          else:
              plt.show()