语音自动播报的问题 WeixinJSBridg
696 2023-04-03 04:51:55
保存图片的时候设置参数bbox_inches = 'tight'
,如:
plt.savefig("Matplotlib/graph.webp", bbox_inches = 'tight')
以下是bbox_inches参数介绍:
bbox_inches: str or Bbox, default: rcParams["savefig.bbox"] (default: None)
Bounding box in inches: only the given portion of the figure is saved. If 'tight', try to figure out the tight bbox of the figure.