相关疑难解决方法(0)

调整matplotlib注释框内的填充

我正在对象annotate上使用该方法Axes向绘图添加带有文本的箭头.例如:

ax.annotate('hello world,
            xy=(1, 1),
            xycoords='data',
            textcoords='data',
            fontsize=12,
            backgroundcolor='w',
            arrowprops=dict(arrowstyle="->",
                            connectionstyle="arc3")
Run Code Online (Sandbox Code Playgroud)

这很好,但我想减少注释框内部的填充.从本质上讲,我想让文章围绕文本"挤压".有没有办法通过arrowpropsbbox_propskwargs 这样做?

我正在寻找像borderpad传说中那样的东西,类似于在这个答案中讨论的东西.

python matplotlib

1
推荐指数
1
解决办法
6040
查看次数

标签 统计

matplotlib ×1

python ×1