如何在LightTable中更改matplotlib内联图的背景颜色?

时间:2015-04-22 13:59:47

标签: python matplotlib lighttable

如何在LightTable中更改matplotlib内联绘图边的背景颜色?在下图中,看到轴标签有点困难。我可以使用基于python的解决方案(即显示的python代码的修改),或基于LightTable的解决方案(即其中一个设置文件的更改,但我不知道哪一个--eg是user.behaviors?)。

Matplotlib inline plot in Light Table

1 个答案:

答案 0 :(得分:1)

如果先创建图形,可以使用patch.set_facecolor设置背景颜色:

fig=plt.figure()
fig.patch.set_facecolor('white')

不确定它是否适用于LightTable(之前从未使用过),但这在ipython会话中有效,所以希望它可以移植到LightTable

相关问题