Skip to content

Commit

Permalink
Make code compatible to matplotlib 3
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou13 committed Jul 24, 2019
1 parent 51e9378 commit a549a45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions post.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,17 @@ def handle(allname):
imshow(im[:, :, ::-1])
for (a, b) in gtlines:
plt.plot([a[1], b[1]], [a[0], b[0]], c="orange", linewidth=0.5)
plt.scatter(a[1], a[0], *PLTOPTS)
plt.scatter(b[1], b[0], *PLTOPTS)
plt.scatter(a[1], a[0], **PLTOPTS)
plt.scatter(b[1], b[0], **PLTOPTS)
plt.savefig(npz_name.replace(".npz", ".png"), dpi=500, bbox_inches=0)

thres = [0.97, 0.98, 0.99]
for i, t in enumerate(thres):
imshow(im[:, :, ::-1])
for (a, b), s in zip(nlines[nscores > t], nscores[nscores > t]):
plt.plot([a[1], b[1]], [a[0], b[0]], c=c(s), linewidth=0.5)
plt.scatter(a[1], a[0], *PLTOPTS)
plt.scatter(b[1], b[0], *PLTOPTS)
plt.scatter(a[1], a[0], **PLTOPTS)
plt.scatter(b[1], b[0], **PLTOPTS)
plt.savefig(
npz_name.replace(".npz", f"_{i}.png"), dpi=500, bbox_inches=0
)
Expand Down

0 comments on commit a549a45

Please sign in to comment.