Skip to content

Commit

Permalink
pass cmap object instead of string to ColorbarBase
Browse files Browse the repository at this point in the history
mpl 3+ no longer accepts passing a string, whereas mpl 2.x did.

closes #42
  • Loading branch information
kecnry committed Jul 16, 2019
1 parent b6c173c commit d38c02b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autofig/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ def draw_sidebars(self, ax=None, i=None):
cbax, cbkwargs = mplcolorbar.make_axes((ax,), location='right', fraction=0.15, shrink=1.0, aspect=20, panchor=False)
callbacks._connect_to_autofig(self, cbax)

cbartist = mplcolorbar.ColorbarBase(cbax, cmap=c.cmap, norm=c.get_norm(i=i), **cbkwargs)
cbartist = mplcolorbar.ColorbarBase(cbax, cmap=plt.get_cmap(c.cmap), norm=c.get_norm(i=i), **cbkwargs)
cbartist.set_label(c.label_with_units)

callbacks._connect_to_autofig(c, cbartist)
Expand Down

0 comments on commit d38c02b

Please sign in to comment.