show name in title

This commit is contained in:
Martin Diehl 2020-11-16 17:25:13 +01:00
parent 5a53f8743b
commit a8fec922d5
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class Colormap(mpl.colors.ListedColormap):
def __repr__(self):
"""Show colormap as matplotlib figure."""
fig = plt.figure(figsize=(5,.5))
fig = plt.figure(self.name,figsize=(5,.5))
ax1 = fig.add_axes([0, 0, 1, 1])
ax1.set_axis_off()
ax1.imshow(np.linspace(0,1,self.N).reshape(1,-1),