|
1 | 1 | ``CenteredNorm`` halfrange is not modified when vcenter changes
|
2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3 | 3 |
|
4 |
| -Previously, the halfrange would expand in proportion to the |
5 |
| -amount that vcenter was moved away from either vmin or vmax. Now, |
6 |
| -the halfrange will not be updated when vcenter is changed. If the |
7 |
| -halfrange also needs to be updated, one can set the halfrange |
8 |
| -manually or call autoscale() after setting vcenter. |
| 4 | +Previously, the **halfrange** would expand in proportion to the |
| 5 | +amount that **vcenter** was moved away from either **vmin** or **vmax**. |
| 6 | +Now, the halfrange remains fixed when vcenter is changed, and **vmin** and |
| 7 | +**vmax** are updated based on the **vcenter** and **halfrange** values. |
| 8 | + |
| 9 | +For example, this is what the values were when changing vcenter previously. |
| 10 | + |
| 11 | +.. code-block:: |
| 12 | +
|
| 13 | + norm = CenteredNorm(vcenter=0, halfrange=1) |
| 14 | + # Move vcenter up by one |
| 15 | + norm.vcenter = 1 |
| 16 | + # updates halfrange and vmax (vmin stays the same) |
| 17 | + # norm.halfrange == 2, vmin == -1, vmax == 3 |
| 18 | +
|
| 19 | +and now, with that same example |
| 20 | + |
| 21 | +.. code-block:: |
| 22 | +
|
| 23 | + norm = CenteredNorm(vcenter=0, halfrange=1) |
| 24 | + norm.vcenter = 1 |
| 25 | + # updates vmin and vmax (halfrange stays the same) |
| 26 | + # norm.halfrange == 1, vmin == 0, vmax == 2 |
| 27 | +
|
| 28 | +The **halfrange** can be set manually or ``norm.autoscale()`` |
| 29 | +can be used to autmatically set the limits after setting **vcenter**. |
0 commit comments