set plot_results function apart

* Both of the two scripts uses the same function,
  so it is necessary to create this replaytools.