From d494c1f3e0e7f60c60d1a4843435e8f2d1b02252 Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Fri, 17 Dec 2021 18:05:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/ops.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/ops.py b/utils/ops.py index 546c950..23ea543 100644 --- a/utils/ops.py +++ b/utils/ops.py @@ -73,13 +73,12 @@ def visual_1D(points_list, frequency=1): ''' 可视化1D数据 ''' - # 首先创建绘图网格 - # ax will be an array of two Axes objects + # 首先创建绘图网格,1个子图 fig, ax = plt.subplots(1) x = np.linspace(0, len(points_list)-1, len(points_list)) / frequency # 在对应对象上调用 plot() 方法 - ax[0].plot(x, points_list) + ax.plot(x, points_list) fig.show() def visual_2D(img):