【发布时间】:2018-10-18 22:40:53
【问题描述】:
我想根据字典中的数据制作一个简单的 XY 图。我的数据看起来像这样:
D = {'str1': [[1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7]],'str2': [[8, 9,
10, 11, 12], [8, 9, 10, 11, 12]]}
有没有办法只绘制,例如,第一个字典形式 D。 该命令应该类似于
plt.plot("str1")
【问题讨论】:
-
plt.plot(D['str1'][0],D['str1'][1])
标签: python python-2.7 pandas matplotlib plot