Skip to content

Commit 36a8f05

Browse files
authored
Merge pull request #412 from int-brain-lab/bb_fix
get figure object from axis
2 parents 6b17860 + ba8f405 commit 36a8f05

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

brainbox/ephys_plots.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ def plot_brain_regions(channel_ids, channel_depths=None, brain_regions=None, dis
404404
if display:
405405
if ax is None:
406406
fig, ax = plt.subplots()
407+
else:
408+
fig = ax.get_figure()
407409

408410
for reg, col in zip(regions, region_colours):
409411
height = np.abs(reg[1] - reg[0])

0 commit comments

Comments
 (0)