1import numpy as np
2import matplotlib.pyplot as plt
3
4#Define arrays x, y1, y2, y3
5
6fig = plt.figure()
7ax = fig.add_axes((0.1,0.4,0.5,0.5))
8
9ax.plot(x1,y1,linestyle='-',label='one')
10ax.plot(x1,y2,linestyle='--',label='two')
11ax.plot(x1,y3,linestyle='dotted',label='three')
12
13ax.legend(bbox_to_anchor=(1.05,1.0),loc='best')
14
15fig.savefig('Figure1.pdf')