SylvanDing commited on
Commit
5743deb
1 Parent(s): 488fb0a

Update plot.py (#7654)

Browse files
Files changed (1) hide show
  1. utils/plots.py +1 -1
utils/plots.py CHANGED
@@ -426,7 +426,7 @@ def plot_results(file='path/to/results.csv', dir=''):
426
  s = [x.strip() for x in data.columns]
427
  x = data.values[:, 0]
428
  for i, j in enumerate([1, 2, 3, 4, 5, 8, 9, 10, 6, 7]):
429
- y = data.values[:, j]
430
  # y[y == 0] = np.nan # don't show zero values
431
  ax[i].plot(x, y, marker='.', label=f.stem, linewidth=2, markersize=8)
432
  ax[i].set_title(s[j], fontsize=12)
 
426
  s = [x.strip() for x in data.columns]
427
  x = data.values[:, 0]
428
  for i, j in enumerate([1, 2, 3, 4, 5, 8, 9, 10, 6, 7]):
429
+ y = data.values[:, j].astype('float')
430
  # y[y == 0] = np.nan # don't show zero values
431
  ax[i].plot(x, y, marker='.', label=f.stem, linewidth=2, markersize=8)
432
  ax[i].set_title(s[j], fontsize=12)