Matplotlib.axis.axis.get_tightbbox()
matplotlib库的Axis模块中的Axis.get_tightbbox()函数用于获取包围轴的边框。
语法:Axis.get_tightbbox(self, renderer)
参数:该方法接受以下参数。
- renderer:这个参数是RendererBase实例
返回值:该方法返回包含轴的边界框。
下面的例子演示了matplotlib.axis.axis.get_tightbbox()函数在matplotlib.axis中的作用:
示例1
输出:
Value Return:
Bbox(x0=75.48368298368294, y0= 29.07777777777777776, x1=574.7670454545455, y1=43.077777777777776)
示例2
输出:
Valure Return:
Bbox(x0=75.5625, y0=29.077777777777776, x1=580.4375, y1= 43.07777777777777776)