Skip to content

Commit 4d5072b

Browse files
committed
remove mpl warning
1 parent 120798b commit 4d5072b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tikzplotlib/_axes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ def _colorbar(self, colorbar, data):
386386
)
387387
colorbar_styles.append("ylabel={" + colorbar_ylabel + "}")
388388

389-
mycolormap, is_custom_cmap = _mpl_cmap2pgf_cmap(colorbar.get_cmap(), data)
389+
mycolormap, is_custom_cmap = _mpl_cmap2pgf_cmap(
390+
colorbar.mappable.get_cmap(), data
391+
)
390392
if is_custom_cmap:
391393
self.axis_options.append("colormap=" + mycolormap)
392394
else:

0 commit comments

Comments
 (0)