Skip to content

Commit 4127b5a

Browse files
authored
Update plot.py
fix matplotlib.pyplot error
1 parent 41b3b9b commit 4127b5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

colabdesign/shared/plot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def rescale(a, amin=None, amax=None):
150150

151151
colors[:,:3] = colors[:,:3] + (1 - colors[:,:3]) * (0.50 * z + 0.50 * tint_mask) / 3
152152
colors[:,:3] = colors[:,:3] * (0.20 + 0.25 * z + 0.55 * shadow_mask)
153+
colors = np.clip(colors,0,1)
153154

154155
set_lim = False
155156
if ax is None:
@@ -333,4 +334,4 @@ def nankabsch(a,b,**kwargs):
333334
# make animation!
334335
ani = animation.ArtistAnimation(fig, ims, blit=True, interval=interval)
335336
plt.close()
336-
return ani.to_html5_video()
337+
return ani.to_html5_video()

0 commit comments

Comments
 (0)