In [20]:
%matplotlib inline

from matplotlib import pyplot as plt

plt.figure(figsize=(12,4))

plt.subplot(121)
plt.plot([1, 3], [3,3], 'o-', label="s1")
plt.plot([2, 4], [2,2], 'o-', label="s2")
plt.ylabel("Weight")
plt.xlabel("Value")
plt.xlim(0, 5)
plt.ylim(0, 6)
plt.legend()

plt.subplot(122)
plt.plot([1,2,2,3,3,4], [3,3,5,5,2,2], 'o-', label="s1 + s2")
plt.ylabel("Weight")
plt.xlabel("Value")
plt.xlim(0, 5)
plt.ylim(0, 6)
plt.legend()


Out[20]:
<matplotlib.legend.Legend at 0x1101ff2e8>

In [ ]: