Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
epistoteles committed Jun 16, 2024
1 parent 08698b2 commit 4c54fef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ tensorhue.set_printoptions(colorscheme=cs)

By default, TensorHue normalizes numerical values between 0 and 1 and then applies the matplotlib colormap. If you want to use diverging colormaps such as `coolwarm` or `bwr` and the value 0 to be mapped to the middle of the colormap, you need to specify the normailzer, e.g. `matplotlib.colors.CenteredNorm`:

from matplotlib.colors import CenteredNorm

```python
from matplotlib.colors import CenteredNorm
cs = ColorScheme(colormap=colormaps['bwr'],
normalize=CenteredNorm(vcenter=0))
t.viz(cs)
Expand Down

0 comments on commit 4c54fef

Please sign in to comment.