From 4654ee4e8d5ddcbdbd73c920e5cc29f926a48b03 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 4 Sep 2012 23:35:27 -0400 Subject: [PATCH] Fixed plotting with void cells. Closes #110 on github. --- src/plot.F90 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/plot.F90 b/src/plot.F90 index 7582130454..d6a949233e 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -115,9 +115,16 @@ contains if (pl % color_by == PLOT_COLOR_MATS) then ! Assign color based on material c => cells(p % coord % cell) - r = pl % colors(c % material) % rgb(1) - g = pl % colors(c % material) % rgb(2) - b = pl % colors(c % material) % rgb(3) + if (c % material == MATERIAL_VOID) then + ! By default, color void cells white + r = 255 + g = 255 + b = 255 + else + r = pl % colors(c % material) % rgb(1) + g = pl % colors(c % material) % rgb(2) + b = pl % colors(c % material) % rgb(3) + end if else if (pl % color_by == PLOT_COLOR_CELLS) then ! Assign color based on cell r = pl % colors(p % coord % cell) % rgb(1)