-
Notifications
You must be signed in to change notification settings - Fork 25
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
Change mask color for nan/inf values to light grey for contour plots #180
Conversation
with min rather than min+1 to not draw entire background as min
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
src/plot/plcontourplot.cpp
Outdated
@@ -250,16 +261,17 @@ void wxPLContourPlot::Draw(wxPLOutputDevice &dc, const wxPLDeviceMapping &map) { | |||
dc.NoPen(); | |||
// background set to min | |||
// assume RebuildMask has been called | |||
wxColor bgc(m_cmap->ColourForValue(m_zMin)); | |||
//wxColor bgc(m_cmap->ColourForValue(m_zMin)); | |||
wxColor bgc(*wxLIGHT_GREY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be a defined value like CONTOUR_BG or COUNTOUR_NAN_COLOR for future maintenance - what do you think?
tab nonfinite values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on the mac!
-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