Change mask color for nan/inf values to light grey for contour plots#180
Merged
Conversation
with min rather than min+1 to not draw entire background as min
Collaborator
Author
sjanzou
approved these changes
Nov 19, 2024
sjanzou
left a comment
Collaborator
There was a problem hiding this comment.
On MacOS 14.6.1, the test file parametrics are displayed nicely:

However, on the "Heat map" results tab, the default color map is jet and shows the NaN values as (same for all colormap selections)

The confusing issue is that on the "Heat map" page, the NaN color is the same as the zero color

Regardless, your pull request is a great improvement!
| // assume RebuildMask has been called | ||
| wxColor bgc(m_cmap->ColourForValue(m_zMin)); | ||
| //wxColor bgc(m_cmap->ColourForValue(m_zMin)); | ||
| wxColor bgc(*wxLIGHT_GREY); |
Collaborator
There was a problem hiding this comment.
Maybe this should be a defined value like CONTOUR_BG or COUNTOUR_NAN_COLOR for future maintenance - what do you think?
Collaborator
Author
tab nonfinite values
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







-Rather than drawing nonfinite results as the minimum color in contour plots, draw them as light grey
-Start from the minimum value for contour layer plotting rather than min value + 1; previously, contour made min color the background then counted from the next layer
-Light grey preset is now background color before any layers are drawn
-Useful in parametrics with Nan or inf values in outputs, such as payback period or internal rate of return