2016-07-13 06:44:41 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-07-25 13:57:41 +02:00
|
|
|
#include "rtc_tools/rtc_event_log_visualizer/plot_python.h"
|
2016-07-13 06:44:41 -07:00
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2019-07-05 19:08:33 +02:00
|
|
|
|
2016-07-29 14:48:54 +02:00
|
|
|
#include <memory>
|
2018-11-28 16:47:49 +01:00
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
2016-07-13 06:44:41 -07:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "rtc_base/checks.h"
|
2017-07-14 06:30:03 -07:00
|
|
|
|
2016-07-13 06:44:41 -07:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
PythonPlot::PythonPlot() {}
|
|
|
|
|
|
|
|
|
|
PythonPlot::~PythonPlot() {}
|
|
|
|
|
|
2016-08-01 12:03:27 -07:00
|
|
|
void PythonPlot::Draw() {
|
2020-06-09 17:17:21 +02:00
|
|
|
PrintPythonCode();
|
2016-07-13 06:44:41 -07:00
|
|
|
}
|
|
|
|
|
|
2019-04-11 18:34:01 +02:00
|
|
|
PythonPlotCollection::PythonPlotCollection(bool shared_xaxis)
|
|
|
|
|
: shared_xaxis_(shared_xaxis) {}
|
2016-07-13 06:44:41 -07:00
|
|
|
|
|
|
|
|
PythonPlotCollection::~PythonPlotCollection() {}
|
|
|
|
|
|
2016-08-01 12:03:27 -07:00
|
|
|
void PythonPlotCollection::Draw() {
|
2020-06-09 17:17:21 +02:00
|
|
|
PrintPythonCode(shared_xaxis_);
|
2016-07-13 06:44:41 -07:00
|
|
|
}
|
|
|
|
|
|
2016-08-01 12:03:27 -07:00
|
|
|
Plot* PythonPlotCollection::AppendNewPlot() {
|
2016-07-13 06:44:41 -07:00
|
|
|
Plot* plot = new PythonPlot();
|
2016-08-01 12:03:27 -07:00
|
|
|
plots_.push_back(std::unique_ptr<Plot>(plot));
|
2016-07-13 06:44:41 -07:00
|
|
|
return plot;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|