From 8db95349098dd35378c0ed5f449b4b9a21bb44e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Terelius?= Date: Wed, 3 Feb 2021 14:34:14 +0100 Subject: [PATCH] Support event log visualization in python3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:12431 Change-Id: I54910e862ab8de013879af632efc2f3834d80552 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205526 Reviewed-by: Elad Alon Commit-Queue: Björn Terelius Cr-Commit-Position: refs/heads/master@{#33170} --- rtc_tools/rtc_event_log_visualizer/plot_base.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rtc_tools/rtc_event_log_visualizer/plot_base.cc b/rtc_tools/rtc_event_log_visualizer/plot_base.cc index dce601a832..82533e6eb0 100644 --- a/rtc_tools/rtc_event_log_visualizer/plot_base.cc +++ b/rtc_tools/rtc_event_log_visualizer/plot_base.cc @@ -127,9 +127,8 @@ void Plot::PrintPythonCode() const { // There is a plt.bar function that draws bar plots, // but it is *way* too slow to be useful. printf( - "plt.vlines(x%zu, map(lambda t: min(t,0), y%zu), map(lambda t: " - "max(t,0), y%zu), color=colors[%zu], " - "label=\'%s\')\n", + "plt.vlines(x%zu, [min(t,0) for t in y%zu], [max(t,0) for t in " + "y%zu], color=colors[%zu], label=\'%s\')\n", i, i, i, i, series_list_[i].label.c_str()); if (series_list_[i].point_style == PointStyle::kHighlight) { printf(