import numpy as np import matplotlib.pyplot as plt left = 0.2 bottom = 0.1 width = 0.7 height = 0.8 x = np.linspace(0, np.pi*4, 100) y = np.cos(x) + np.sin(x) fig = plt.figure() ax = fig.add_axes([left, bottom, width, height]) ax.plot(x, y)