Commit 6737303
committed
Restore autolimits status when pressing "home" key.
When pressing the "home" key, the autoscaling state should be
restored as well, as interactive zoom/pan could have turned it off.
test_toolbar_home_restores_autoscale shows an example of why. Assume
one starts with `plot(range(11), range(11))`. In linear scale this
autoscales to (0, 10) (assuming no margins or the old round limits
mode); in log scale this autoscales to (1, 10) (dropping the zero). But
previously, when "home" did not restore autoscale state, then a manual
zoom followed by "home" (in linear scale) would set the limits to (0,
10) and turn off autoscale, after which switching to log scale
interactively would give incorrect autolimits.1 parent 4666bef commit 6737303
File tree
3 files changed
+52
-24
lines changed- lib
- matplotlib
- axes
- tests
- mpl_toolkits/mplot3d
3 files changed
+52
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3985 | 3985 | | |
3986 | 3986 | | |
3987 | 3987 | | |
3988 | | - | |
3989 | | - | |
3990 | | - | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
3991 | 3991 | | |
3992 | | - | |
3993 | | - | |
3994 | | - | |
3995 | | - | |
3996 | | - | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
3997 | 3995 | | |
3998 | | - | |
3999 | | - | |
4000 | | - | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
4001 | 4000 | | |
4002 | 4001 | | |
4003 | 4002 | | |
4004 | 4003 | | |
4005 | 4004 | | |
4006 | | - | |
| 4005 | + | |
| 4006 | + | |
4007 | 4007 | | |
4008 | | - | |
4009 | | - | |
4010 | | - | |
4011 | | - | |
4012 | | - | |
| 4008 | + | |
| 4009 | + | |
4013 | 4010 | | |
4014 | | - | |
4015 | | - | |
4016 | | - | |
| 4011 | + | |
4017 | 4012 | | |
4018 | 4013 | | |
4019 | 4014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
283 | 313 | | |
284 | 314 | | |
285 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
1003 | | - | |
1004 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
1005 | 1008 | | |
1006 | 1009 | | |
1007 | 1010 | | |
1008 | | - | |
1009 | | - | |
| 1011 | + | |
| 1012 | + | |
1010 | 1013 | | |
1011 | 1014 | | |
1012 | 1015 | | |
| |||
0 commit comments