Commit b8e39f9
committed
Make set_marker{edge,face}color(None) more consistent.
Resolving None to mean "the rcParam" is both consistent with the
behavior in `__init__` (which manually maps None to the rcParam) and
with markeredgewidth. In particular, being consistent with `__init__`
ensures that in
```
from pylab import *; from matplotlib.lines import Line2D
rcParams["lines.markerfacecolor"] = "red"
gca().add_artist(Line2D([.1, .9], [.1, .9], marker="o", markerfacecolor=None))
gca().add_artist(Line2D([.1, .9], [.9, .1], marker="o", mfc=None))
```
both lines use "red" as markerfacecolor (previously, the second one
would go through the setter and use "auto" (i.e. the line's color)
instead).
I guess this should have been done when the rcParams were added in
1d9880c, but missed back then.
(No change for markerfacecoloralt because there's no corresponding
rcParam; perhaps one should be added just for completeness?)1 parent a9c5224 commit b8e39f9
File tree
2 files changed
+13
-11
lines changed- doc/api/next_api_changes/behavior
- lib/matplotlib
2 files changed
+13
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
| |||
386 | 382 | | |
387 | 383 | | |
388 | 384 | | |
389 | | - | |
| 385 | + | |
390 | 386 | | |
391 | | - | |
| 387 | + | |
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
| |||
1146 | 1142 | | |
1147 | 1143 | | |
1148 | 1144 | | |
1149 | | - | |
| 1145 | + | |
1150 | 1146 | | |
1151 | | - | |
| 1147 | + | |
| 1148 | + | |
1152 | 1149 | | |
1153 | 1150 | | |
1154 | 1151 | | |
| |||
1167 | 1164 | | |
1168 | 1165 | | |
1169 | 1166 | | |
1170 | | - | |
| 1167 | + | |
1171 | 1168 | | |
1172 | 1169 | | |
1173 | 1170 | | |
| |||
1177 | 1174 | | |
1178 | 1175 | | |
1179 | 1176 | | |
1180 | | - | |
| 1177 | + | |
1181 | 1178 | | |
1182 | 1179 | | |
1183 | 1180 | | |
| |||
1187 | 1184 | | |
1188 | 1185 | | |
1189 | 1186 | | |
1190 | | - | |
| 1187 | + | |
1191 | 1188 | | |
1192 | 1189 | | |
1193 | 1190 | | |
| |||
0 commit comments