Skip to content

Normalisation doesn't seem to work #17

Open
@bertinets

Description

@bertinets

Seems to me that the 'normalize' option for the shading doesn't work.
After having a look at the helper functions in utils.py (lines 5-10) the problems seems to be here:

def get_colors(inp, colormap="viridis", normalize=True, vmin=None, vmax=None):
colormap = plt.cm.get_cmap(colormap)
if normalize:
vmin=np.min(inp)
vmax=np.max(inp)

I think that should be change in:

def get_colors(inp, colormap="viridis", normalize=True, vmin=None, vmax=None):
colormap = plt.cm.get_cmap(colormap)
if not normalize:
vmin=np.min(inp)
vmax=np.max(inp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions