DISPLAY ATTRIBUTE VALUES
Listing 5.2 displays the content of mat_attrib_values.py that shows the attribute values of an object in Matplotlib (subplots are discussed later in this chapter).
LISTING 5.2: mat_attrib_values.py
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
print("=> attribute values:")
print(plt.getp(fig))
Listing 5.2 contains an import statement, followed by the variables fig and ax, which are initialized by invoking the subplots() method of the plt class. The next block of code prints the attribute values in fig by invoking the plt.getp() method. Launch the code in Listing 5.2, and you will see the following output:
=> attribute values:
agg_filter = None
alpha = None
animated = False
axes = [<AxesSubplot:>]
children = [<matplotlib.patches.Rectangle object at 0x11c34f0...
clip_box = None
clip_on = True
clip_path = None
constrained_layout = False
constrained_layout_pads = (0.04167, 0.04167, 0.02...