首页 > 解决方案 > Using matplotlib.pyplot.clabel to add labels with a transparent background

问题描述

For matplotlib.pyplot.clabel, is it possible to add labels to a contour plot without the white space behind the labels covering up any portion the contour lines? When I try to add labels to a contour plot it tends to cover up part of the contour plot with white space. Perhaps there is a way of making the background of the text transparent?

标签: python-3.xmatplotlibcontour

解决方案


使用inline论据

 plt.clabel(..., inline=False)

推荐阅读