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

Correcting normalization #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Correcting normalization #49

wants to merge 4 commits into from

Conversation

mvlier
Copy link

@mvlier mvlier commented Jul 27, 2024

It was not possible to set vmin and vmax for normalization of the cmap.
With this changes, now it is possible to choose those values when setting shading = {"normalization": [vmin, vmax]}
inside plot or subplot.

The solution given in #41 works only for the case of choosing vmin and vmax, and would fail when the user wants
vmin and vmax to be set automatically.

mvlier added 4 commits July 27, 2024 08:50
Now the variable normalize gets the value False when the user specifies vmin and vmax.
vmin and vmax can be defined when using
mp.plot(...,  shading = {"normalize" = [vmin, vmax]}, ...)
If nothing is set by the user the standard value is 
"normalize" = [None, None].
If any of the two entries are None, then the variable normalize in Viewer.py gets the value True, and vmin and vmax are chosen inside utils.py in get_colors.
We don't need the variable normalize, since the condtion in get_colors can be written based on vmin and vmax
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

Successfully merging this pull request may close these issues.

1 participant