1import matplotlib.pyplot as plt
2fig = plt.figure()
3ax1 = fig.add_subplot(111)
4ax1.scatter(x1, y1, s = 10, c = 'b', label = 'elbow')
5ax1.scatter(x2, y2, s = 10, c = 'r', label = 'shoulder')
6plt.legend(loc='upper left');
7plt.show()
1import matplotlib.pyplot as plt
2
3x = range(100)
4y = range(100,200)
5fig = plt.figure()
6ax1 = fig.add_subplot(111)
7
8ax1.scatter(x[:4], y[:4], s=10, c='b', marker="s", label='first')
9ax1.scatter(x[40:],y[40:], s=10, c='r', marker="o", label='second')
10plt.legend(loc='upper left');
11plt.show()
12