Commit 48c7360
committed
Drop None from Container.get_children().
Before the patch,
```
ec = plt.errorbar([1, 2], [3, 4], [5, 6], capsize=2, fmt="none")
print(ec.get_children())
```
would print `None` (corresponding to the "not drawn" line connecting the
data points), two `Line2D` and one `LineCollection`.
This patch drops the `None` out, as it is arguably not a child of the
Container. (It is still possible to access the individual members of
the Container by unpacking it as a tuple.)
Also reformat an overly indented piece of code in the vicinity.1 parent 2bce760 commit 48c7360
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
102 | 101 | | |
103 | 102 | | |
104 | 103 | | |
105 | | - | |
| 104 | + | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
0 commit comments