From 984b4a782f21cd6f7ca7bb5716809dffa4451b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=BC=E5=B0=8F=E8=BE=89=E4=B8=B6?= <760198141@qq.com> Date: Wed, 13 Oct 2021 14:00:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Matplotlib Drawing/Problem 3/B.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Matplotlib Drawing/Problem 3/B.py diff --git a/Matplotlib Drawing/Problem 3/B.py b/Matplotlib Drawing/Problem 3/B.py new file mode 100644 index 0000000..5666a95 --- /dev/null +++ b/Matplotlib Drawing/Problem 3/B.py @@ -0,0 +1,8 @@ +import numpy as np +import matplotlib.pyplot as plt +data = [[10., 20., 30., 20.],[40., 25., 53., 18.],[6., 22., 52., 19.]] +x = np.arange(4) +colors = ['r', 'g', 'b'] +for i in range(len(data)): + plt.plot(x + i * 0.25, data[:i], color = colors[i], width = 0.25) +plt.show() \ No newline at end of file -- GitLab