Making CA local info values plotting utility make uniform plots of zero be all white (contributed by Conor Finn)

This commit is contained in:
jlizier 2018-06-08 21:25:32 +10:00
parent de5661b1e3
commit fd13b75be3
1 changed files with 5 additions and 1 deletions

View File

@ -176,7 +176,11 @@ function h = plotLocalInfoValues(localResults, plotOptions)
bluemap = prepareColourmap(mainSignVectorLength, true, scalingMainComponent, scalingScdryComponent, gammaPower);
colormap(bluemap);
% Now, plot the local values with the pre-prepared colormap
h = imagesc(localResultsToPlot, [0, maxLocal]);
if (maxLocal == 0)
h = imagesc(localResultsToPlot, [0, 1]);
else
h = imagesc(localResultsToPlot, [0, maxLocal]);
end
end
axis([0.5 (plotOptions.plotCols+0.5) 0.5 (plotOptions.plotRows+0.5)]);
colorbar