Skip to content

Commit f468a77

Browse files
committed
Assign masking color to wxCONTOUR_BG, apply masking color to heat map
tab nonfinite values
1 parent d64a03f commit f468a77

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

include/wex/plot/plcolourmap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141

4242
#include "wex/plot/plplot.h"
4343

44+
#define wxCONTOUR_BG wxStockGDI::GetColour(wxStockGDI::COLOUR_LIGHTGREY)
45+
4446
class wxPLColourMap : public wxPLSideWidgetBase {
4547
public:
4648
wxPLColourMap(double min = 0, double max = 1);

src/plot/plcolourmap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void wxPLColourMap::Render(wxPLOutputDevice &dc, const wxPLRealRect &geom) {
159159
}
160160

161161
wxColour wxPLColourMap::ColourForValue(double val) {
162-
if (m_colourList.size() == 0 || !(wxFinite(val))) return *wxBLACK;
162+
if (m_colourList.size() == 0 || !(wxFinite(val))) return *wxCONTOUR_BG;
163163

164164
int position =
165165
(int) (((double) m_colourList.size()) * (

src/plot/plcontourplot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void wxPLContourPlot::Draw(wxPLOutputDevice &dc, const wxPLDeviceMapping &map) {
262262
// background set to min
263263
// assume RebuildMask has been called
264264
//wxColor bgc(m_cmap->ColourForValue(m_zMin));
265-
wxColor bgc(*wxLIGHT_GREY);
265+
wxColor bgc(*wxCONTOUR_BG);
266266
dc.Brush(bgc);
267267
wxRealPoint pos, size;
268268
map.GetDeviceExtents(&pos, &size);

0 commit comments

Comments
 (0)