Commit bfcb305
committed
SubplotParams.validate-associated fixes.
SubplotParams.validate was previously only used in SubplotTool so that
when resetting the SubplotParams, a temporarily invalid SubplotParams
would be ignored. But the temporary `validate = False` was put at the
wrong place (it should wrap `_on_reset`'s implementation, not its
attachment to `buttonreset`). Indeed, setting e.g. "left" to 0.0 and
"right" to 0.01 and then pressing reset (when using e.g. tk) would throw
an exception (because "left" would first be reset to 0.125 before
"right" gets reset to 0.9, and the intermediate state is invalid).
Instead, just use the already existing `Widgets.eventson` mechanism to
temporarily disable updates.
Also apply the corresponding change for Qt's own SubplotTool.
Deprecate the then unused (and undocumented) SubplotParams.validate; in
order to keep it writable during the deprecation period, slightly tweak
the implementation of _deprecate_privatize_attribute.1 parent cb756d3 commit bfcb305
File tree
6 files changed
+45
-28
lines changed- doc/api/next_api_changes/deprecations
- lib/matplotlib
- _api
- backends
- tests
6 files changed
+45
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | 780 | | |
787 | 781 | | |
788 | 782 | | |
| |||
821 | 815 | | |
822 | 816 | | |
823 | 817 | | |
824 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
825 | 824 | | |
826 | 825 | | |
827 | 826 | | |
| |||
836 | 835 | | |
837 | 836 | | |
838 | 837 | | |
839 | | - | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
840 | 844 | | |
841 | 845 | | |
842 | 846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
159 | | - | |
| 163 | + | |
160 | 164 | | |
161 | 165 | | |
162 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1402 | 1402 | | |
1403 | 1403 | | |
1404 | 1404 | | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1405 | + | |
1410 | 1406 | | |
1411 | 1407 | | |
1412 | 1408 | | |
| |||
1417 | 1413 | | |
1418 | 1414 | | |
1419 | 1415 | | |
1420 | | - | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
1421 | 1419 | | |
1422 | 1420 | | |
1423 | | - | |
| 1421 | + | |
| 1422 | + | |
1424 | 1423 | | |
1425 | 1424 | | |
1426 | 1425 | | |
1427 | | - | |
1428 | 1426 | | |
1429 | | - | |
1430 | | - | |
| 1427 | + | |
| 1428 | + | |
1431 | 1429 | | |
1432 | 1430 | | |
1433 | 1431 | | |
| |||
0 commit comments