|
30 | 30 | plt.yticks([-2, -1.8, -1, 1.22, 3],
|
31 | 31 | [r'$really\ bad$', r'$bad$', r'$normal$', r'$good$', r'$really\ good$'])
|
32 | 32 |
|
33 |
| -l1, = plt.plot(x, y2, label='linear line') |
34 |
| -l2, = plt.plot(x, y1, color='red', linewidth=1.0, linestyle='--', label='square line') |
| 33 | +l1, = plt.plot(x, y1, label='linear line') |
| 34 | +l2, = plt.plot(x, y2, color='red', linewidth=1.0, linestyle='--', label='square line') |
35 | 35 |
|
36 |
| -# plt.legend(loc='upper right') |
37 |
| -plt.legend(handles=[l1, l2], labels=['up', 'down'], loc='best') |
| 36 | +plt.legend(loc='upper right') |
| 37 | +# plt.legend(handles=[l1, l2], labels=['up', 'down'], loc='best') |
38 | 38 | # the "," is very important in here l1, = plt... and l2, = plt... for this step
|
39 | 39 | """legend( handles=(line1, line2, line3),
|
40 | 40 | labels=('label1', 'label2', 'label3'),
|
|
0 commit comments