Commit 23eff510 authored by Simon Maretzke's avatar Simon Maretzke
Browse files

Fix color-axis handling for arrays of type logical

parent 8be458e4
......@@ -50,9 +50,15 @@ end
image = squeeze(image);
h = imagesc(image);
axis equal tight off; colorbar;
image = medfilt2(image,'symmetric');
minVal = min(image(:));
maxVal = max(image(:));
caxis([minVal maxVal]);
% determine reasonable range of color axis
if islogical(image)
caxis([0,1]);
else
image = medfilt2(image,'symmetric');
minVal = min(image(:));
maxVal = max(image(:));
caxis([minVal maxVal]);
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment