x = ['TPhP', 'TPrP', 'THP', 'OEP', 'Aristophyll A', 'TETMP', 'DMDHP', 'THDPP', 'BDTDP']
plt.xticks(range(len(x)), x, rotation='vertical')
plt.ylim([-6, 12])
y1 = [-3.8681, -3.7851, -3.6178, -3.6749, -3.9103, -3.6640, -3.8450, -3.6096, -3.8354]
y2 = [3.8681, 3.7851, 3.6178, 3.6749, 3.9103, 3.6640, 3.8450, 3.6096, 3.8354]
y3 = [1.3510, 1.4613, 1.0980, 1.4572, 1.2272, 1.4408, 1.3334, 1.0898, 1.3783]
y4 = [0.3701, 0.3422, 0.4554, 0.3431, 0.4074, 0.3470, 0.3750, 0.4588, 0.3628]
y5 = [0.7402, 0.6843, 0.9108, 0.6863, 0.8148, 0.6940, 0.7500, 0.9176, 0.7256]
y6 = [10.1073, 10.4677, 7.1853, 9.8395, 9.3824, 9.6717, 9.8561, 7.0997, 10.1375]
y7 = [0.0925, 0.0854, 0.0926, 0.0815, 0.0986, 0.0817, 0.0923, 0.0926, 0.0903]
y8 = [0.1918, 0.1928, 0.1733, 0.1886, 0.1888, 0.1876, 0.1903, 0.1727, 0.1916]
plt.plot(x, y1, "-s", label="(ρ)/ eV")
plt.plot(x, y2, "-s", label="(χ)/ eV")
plt.plot(x, y3, "-s", label="(η)/ eV")
plt.plot(x, y4, "-s", label="(S)/ per eV")
plt.plot(x, y5, "-s", label="(σ)/ per eV")
plt.plot(x, y6, "-s", label="(ω)/ eV")
plt.plot(x, y7, "-s", label="(A)/ eV")
plt.plot(x, y8, "-s", label="(I)/ eV")
plt.plot()
#plt.xlabel("Porphyrins")
plt.ylabel("Descriptor values")
#plt.title("Line Graph Example")
plt.legend()
plt.show()
plt.savefig('Descriptors.png')
HOW DO I BRING THE LEGEND OUTSIDE THE GRAPH ? I want it outside the plot area. The x axis is just with the labels and no scales.