检索 Figure 实例中的所有 matplotlib 轴:我应该使用 figure.get_axes() 还是 figure.axes?
Retrieving all matplotlib axes in a Figure instance: should I use figure.get_axes() or figure.axes?
简单问题:两者有什么区别
import matplotlib.pyplot as plt
f = plt.figure()
a = f.get_axes()
和
f = plt.figure()
a = f.axes
用于检索 Figure 实例中的所有轴?有没有哪种情况更可取?`
def get_axes(self):
return self.axes
因此,您使用哪个完全没有区别。
简单问题:两者有什么区别
import matplotlib.pyplot as plt
f = plt.figure()
a = f.get_axes()
和
f = plt.figure()
a = f.axes
用于检索 Figure 实例中的所有轴?有没有哪种情况更可取?`
def get_axes(self):
return self.axes
因此,您使用哪个完全没有区别。