Skip to content

Commit

Permalink
Fix comments / typos
Browse files Browse the repository at this point in the history
  • Loading branch information
briochemc committed Apr 8, 2022
1 parent 5b7edb8 commit 452f3a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmap_picker.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@
% Select colorbar from it
imshow(image)
rect = drawrectangle().Position;

captured_cbar = imcrop(image, rect);
[h, w, ~] = size(captured_cbar);

% Chose orientation along the largest dimension of rectangle
[h, w, ~] = size(captured_cbar);
if h >= w
cmap = flipud(squeeze(mean(captured_cbar, 2))) / 256;
else
cmap = squeeze(mean(captured_cbar, 1)) / 256;
end

% show it to be sure ti worked
% Show the colormap in a colorbar to check it worked
colormap(cmap)
colorbar()

Expand Down

0 comments on commit 452f3a9

Please sign in to comment.