Skip to content

Commit

Permalink
plot_stims takes argument for showing masks
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Jun 15, 2022
1 parent 231c9ba commit fceaa47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stimuli/utils/utils.py
Expand Up @@ -486,15 +486,15 @@ def plot_stim(stim, mask=False, stim_name="stim", ax=None):
return ax


def plot_stimuli(stims):
def plot_stimuli(stims, mask=False):
import math

# Plot each stimulus+mask
n_stim = math.ceil(math.sqrt(len(stims)))
F = plt.figure(figsize=(n_stim * 3, n_stim * 3))
for i, (stim_name, stim) in enumerate(stims.items()):
ax = F.add_subplot(n_stim, n_stim, i + 1)
plot_stim(stim, True, stim_name=stim_name, ax=ax)
plot_stim(stim, mask, stim_name=stim_name, ax=ax)

plt.tight_layout()
plt.show()

0 comments on commit fceaa47

Please sign in to comment.