|
3 | 3 | Artist tests |
4 | 4 | ============ |
5 | 5 |
|
6 | | -Test unit support with each of the matplotlib primitive artist types |
| 6 | +Test unit support with each of the Matplotlib primitive artist types. |
7 | 7 |
|
8 | | -The axes handles unit conversions and the artists keep a pointer to |
9 | | -their axes parent, so you must init the artists with the axes instance |
10 | | -if you want to initialize them with unit data, or else they will not |
11 | | -know how to convert the units to scalars. |
| 8 | +The axis handles unit conversions and the artists keep a pointer to their axis |
| 9 | +parent. You must initialize the artists with the axis instance if you want to |
| 10 | +use them with unit data, or else they will not know how to convert the units |
| 11 | +to scalars. |
12 | 12 | """ |
13 | 13 | import random |
14 | 14 | import matplotlib.lines as lines |
|
35 | 35 | ax.add_collection(lc) |
36 | 36 |
|
37 | 37 | # test a plain-ol-line |
38 | | -line = lines.Line2D( |
39 | | - [0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax) |
| 38 | +line = lines.Line2D([0*cm, 1.5*cm], [0*cm, 2.5*cm], |
| 39 | + lw=2, color='black', axes=ax) |
40 | 40 | ax.add_line(line) |
41 | 41 |
|
42 | 42 | if 0: |
43 | 43 | # test a patch |
44 | 44 | # Not supported at present. |
45 | | - rect = patches.Rectangle( |
46 | | - (1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax) |
| 45 | + rect = patches.Rectangle((1*cm, 1*cm), width=5*cm, height=2*cm, |
| 46 | + alpha=0.2, axes=ax) |
47 | 47 | ax.add_patch(rect) |
48 | 48 |
|
49 | 49 |
|
|
0 commit comments