Skip to content

Commit

Permalink
Minor fix to inshow2
Browse files Browse the repository at this point in the history
Added `clf` avoids issues where subplot may leave some panels from previous plot.
  • Loading branch information
tsipkens committed Apr 15, 2021
1 parent f7f2526 commit 38bcd67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions +tools/imshow2.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@

% If more than one image, prepare to tile and maximize figure.
if n_imgs>1
clf; % clear current figure contents

N1 = floor(sqrt(n_imgs));
N2 = ceil(n_imgs/N1);
subplot(N1, N2, 1);
end



for ii=1:n_imgs % loop over images

if n_imgs>1
Expand Down

0 comments on commit 38bcd67

Please sign in to comment.