1 2 3 4 5 6 7 8 9 10 11 12 13
| import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['SimHei'] fig = plt.figure(figsize=(6,5)) x = [1.5, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5] y = [6, 7, 8, 5, 9, 4, 9.5, 3, 9.5, 2, 9] x1 = [6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10.5, 11, 11] y1 = [1, 8, 2, 9, 3, 9, 4, 9.5, 5, 9, 6, 7, 8] plt.scatter(x, y, color='r', label='左心房') plt.scatter(x1, y1, color='b', label='右心房') plt.title('love') plt.legend() plt.show()
|