Make it possible to import echo likelihood result without plotting

This is a minor change to generated Python code used for testing the echo likelihood metric.

Bug: webrtc:8573
Change-Id: Ifb2438fdd36c3ade8cd830df0d05917af0f77dec
Reviewed-on: https://webrtc-review.googlesource.com/26281
Commit-Queue: Daniel Johansson <dajo@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20939}
This commit is contained in:
Daniel Johansson
2017-11-27 17:36:15 +01:00
committed by Commit Bot
parent 37b5223289
commit 9786720909

View File

@ -55,12 +55,13 @@ void WriteEchoLikelihoodGraphFileHeader(std::ofstream* output_file) {
void WriteEchoLikelihoodGraphFileFooter(std::ofstream* output_file) {
(*output_file) << "])" << std::endl
<< "x = np.arange(len(y))*.01" << std::endl
<< "plt.plot(x, y)" << std::endl
<< "plt.ylabel('Echo likelihood')" << std::endl
<< "plt.xlabel('Time (s)')" << std::endl
<< "plt.ylim([0,1])" << std::endl
<< "plt.show()" << std::endl;
<< "if __name__ == '__main__':" << std::endl
<< " x = np.arange(len(y))*.01" << std::endl
<< " plt.plot(x, y)" << std::endl
<< " plt.ylabel('Echo likelihood')" << std::endl
<< " plt.xlabel('Time (s)')" << std::endl
<< " plt.ylim([0,1])" << std::endl
<< " plt.show()" << std::endl;
}
} // namespace