我敢肯定,这个问题对你来说很容易回答。我使用的是bqplot (带有pyplot),默认情况下,图例是有框架的。所以我的问题是:如何删除框架?有了matplotlib,我知道我可以简单地使用plt.legend(frameon=False),你知道bqplot的直接等价物吗?
这段代码如下所示:
import bqplot.pyplot as pl
plot_test = pl.figure()
test = pl.plot(x,y, colors = ["white"],labels=['blabla'])
pl.legend()
pl.show()提前谢谢你!
发布于 2019-09-19 17:49:23
删除边框的最简单方法是将图例边框宽度更改为0。
plot_test.legend_style = {'stroke-width': 0}

Bqplot图例样式使用SVG CSS样式属性。其他图例样式示例包括.
plot_test.legend_style = {
'fill': 'white' ,
'stroke' : 'blue' ,
'stroke-width':3,
'opacity':0.7
}https://stackoverflow.com/questions/57961598
复制相似问题