Matplotlib.artist.artist.get_window_extent()
Python matplotlib库的artist模块中的get_window_extent()方法 用于返回显示空间中的轴边界框。
语法: Artist.get_window_extent (self, renderer)
参数:该方法接受以下参数。
- renderer:这个参数是RendererBase的子类。
返回: 该方法返回显示空间中的人物包围盒。
下面的例子演示了matplotlib中的matplotlib.artist.artist.get_window_extent()函数:
示例1
输出:
示例2
输出: