绘制列表的子集列

tkclm6bt  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(108)

我想为每个列表元素l[i]绘制列的子集。我的结果列表l[i]由三列和一个索引(每日步骤)组成。当我尝试绘制l[1]时,逻辑上我得到了一个包含所有三列的图,但我想要两个子图。一个具有前两列a和b以及第三列c的一个子批次。我很难找到正确的方法和代码。有人能帮我吗?
示例列表[1]
索引a列b列c列
1.
2.
3.

L = []
X_tot = []
Y_tot = []

for root, dirs, files in os.walk(r"C:\TSA_P"): #location of folder
    for filename in files:
        file_path = os.path.join(root, filename)
        x= open(file_path)
        X_tot.append(x)

for root, dirs, files in os.walk(r"C:\TSA_Q"):  #location of folder
    for filename in files:
        file_path = os.path.join(root, filename)
        y = open(file_path)
        Y_tot.append(y)

i = 0
for i in range(0, len(X_tot)):
    function = Function_V4.dataprocessing(X_tot[i],Y_tot[i])
    L.append(function)
    i = i+1

# print (L)

plt.plot(L[0])

# plt.title('Catchment %s'%i)

# plt.legend()

plt.show()

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题