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 ...@@ -50,9 +50,15 @@ end
image = squeeze(image); image = squeeze(image);
h = imagesc(image); h = imagesc(image);
axis equal tight off; colorbar; axis equal tight off; colorbar;
image = medfilt2(image,'symmetric');
minVal = min(image(:)); % determine reasonable range of color axis
maxVal = max(image(:)); if islogical(image)
caxis([minVal maxVal]); caxis([0,1]);
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