Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalisation doesn't seem to work #17

Open
bertinets opened this issue Jun 30, 2020 · 0 comments
Open

Normalisation doesn't seem to work #17

bertinets opened this issue Jun 30, 2020 · 0 comments

Comments

@bertinets
Copy link

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)

BruegelN added a commit to BruegelN/meshplot that referenced this issue Mar 16, 2023
BruegelN added a commit to BruegelN/meshplot that referenced this issue Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant