Unverified 提交 5743deb9 authored 作者: SylvanDing's avatar SylvanDing 提交者: GitHub

Update plot.py (#7654)

fix bug in issue #7650
上级 488fb0a3
...@@ -426,7 +426,7 @@ def plot_results(file='path/to/results.csv', dir=''): ...@@ -426,7 +426,7 @@ def plot_results(file='path/to/results.csv', dir=''):
s = [x.strip() for x in data.columns] s = [x.strip() for x in data.columns]
x = data.values[:, 0] x = data.values[:, 0]
for i, j in enumerate([1, 2, 3, 4, 5, 8, 9, 10, 6, 7]): for i, j in enumerate([1, 2, 3, 4, 5, 8, 9, 10, 6, 7]):
y = data.values[:, j] y = data.values[:, j].astype('float')
# y[y == 0] = np.nan # don't show zero values # y[y == 0] = np.nan # don't show zero values
ax[i].plot(x, y, marker='.', label=f.stem, linewidth=2, markersize=8) ax[i].plot(x, y, marker='.', label=f.stem, linewidth=2, markersize=8)
ax[i].set_title(s[j], fontsize=12) ax[i].set_title(s[j], fontsize=12)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论