简体   繁体   中英

Retrieving all matplotlib axes in a Figure instance: should I use figure.get_axes() or figure.axes?

Simple question: what is the difference between

import matplotlib.pyplot as plt
f = plt.figure()
a = f.get_axes()

and

f = plt.figure()
a = f.axes

for retrieving all axes in a Figure instance? Are there situations where either would be preferable?`

The sourcecode for get_axes is:

def get_axes(self):
    return self.axes

It therefore makes absolutely no difference at all which one you use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM