left_margin = 1.0
right_margin = 1.0
figure_width = 10.0
figure_height = 7.0
top_margin = 1.0
bottom_margin = 1.0
box_width = left_margin + figure_width + right_margin
box_height = top_margin + figure_height + bottom_margin
cm2inch = 1 / 2.54
fig = figure(figsize=(box_width * cm2inch, box_height * cm2inch))
ax = fig.add_subplot(111)
ax.plot([1, 2, 3])
fig.subplots_adjust(left=left_margin / box_width, bottom=bottom_margin /
    box_height, right=1.0 - right_margin / box_width, top=1.0 - top_margin /
    box_height)
fig.savefig('ten_x_seven_cm.png', dpi=128)
Используя matplotlib, как я могу напечатать что-то «фактического размера»?