Skip to content

Commit

Permalink
Make utils compatible with newest matplotlib Version.
Browse files Browse the repository at this point in the history
matplotlib.cm is now imported explicitly.
  • Loading branch information
MarvinTeichmann committed Jan 11, 2017
1 parent 489d811 commit abd5ff9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils.py
Expand Up @@ -3,6 +3,7 @@

def color_image(image, num_classes=20):
import matplotlib as mpl
import matplotlib.cm
norm = mpl.colors.Normalize(vmin=0., vmax=num_classes)
mycm = mpl.cm.get_cmap('Set1')
return mycm(norm(image))

0 comments on commit abd5ff9

Please sign in to comment.