import matplotlib.pyplot as plt x = [i for i in range(100)] y = [i**2 for i in range(100)] fig = plt.figure(figsize=(3, 3)) plt.plot(x, y) pyscript.write('output', fig)