|
| 1 | +========================================================================== |
| 2 | + MEP15 - Fix axis autoscaling when limits are specified for one axis only |
| 3 | +========================================================================== |
| 4 | + |
| 5 | +.. contents:: |
| 6 | + :local: |
| 7 | + |
| 8 | +Status |
| 9 | +====== |
| 10 | + |
| 11 | +**Discussion** |
| 12 | + |
| 13 | +Branches and Pull requests |
| 14 | +========================== |
| 15 | + |
| 16 | +None so far. |
| 17 | + |
| 18 | +Abstract |
| 19 | +======== |
| 20 | + |
| 21 | +When one axis of a 2-dimensional plot if overridden via `xlim` or `ylim`, |
| 22 | +automatic scaling of the remaining axis should be based on the data that falls |
| 23 | +within the specified limits of the first axis. |
| 24 | + |
| 25 | +Detailed description |
| 26 | +==================== |
| 27 | + |
| 28 | +When axis limits for a 2-D plot are specified for one axis only (via `xlim` or |
| 29 | +`ylim`), matplotlib currently does not currently rescale the other axis. The |
| 30 | +result is that the displayed curves or symbols may be compressed into a tiny |
| 31 | +portion of the available area, so that the final plot conveys much less |
| 32 | +information than it would with appropriate axis scaling. An example of such a |
| 33 | +plot can be found at the following URL: |
| 34 | + |
| 35 | +http://phillipmfeldman.org/Python/MEP15.png |
| 36 | + |
| 37 | +The proposed change of behavior would make matplotlib choose the scale for the |
| 38 | +remaining axis using only the data that falls within the limits for the axis |
| 39 | +where limits were specified. |
| 40 | + |
| 41 | +Implementation |
| 42 | +============== |
| 43 | + |
| 44 | +I don't know enough about the internals of matplotlib to be able to suggest an |
| 45 | +implementation. |
| 46 | + |
| 47 | +Backward compatibility |
| 48 | +====================== |
| 49 | + |
| 50 | +From the standpoint of software interfaces, there would be no break in |
| 51 | +backward compatibility. Some outputs would be different, but if the user |
| 52 | +truly desires the previous behavior, he/she can achieve this by overriding |
| 53 | +the axis scaling for both axes. |
| 54 | + |
| 55 | +Alternatives |
| 56 | +============ |
| 57 | + |
| 58 | +The only alternative that I can see is to maintain the status quo. |
0 commit comments