How do I get the size (width and height) of the rectangle of a plot create with matplotlib's pyplot library. Specifically I need the width of the box:

Here is a part of the code:
import matplotlib.pyplot as plt
plt.figure()
bar_plot = plt.bar(df.index, df_mean, yerr=df_std*1.96, color=colors);
fig.get_size_inches()*fig.dpi?figis i.e.,fig = plt.figure()array([314., 192.])as the output offig.get_size_inches()*fig.dpiand measured it using Inkscape. The value correspond to the entire size of the plot not the box