def adjust_layout(self) :
x0, x1, y0, y1 = plt.axis()
plot_margin_x = 0.01 * float(x1)
plot_margin_y = 0.01 * float(y1)
plt.axis((x0 - plot_margin_x, x1 + plot_margin_x, y0, y1 + plot_margin_y))
plt.tight_layout()