Skip to content

Commit ba8f405

Browse files
committed
get figure object from axis
1 parent 6b17860 commit ba8f405

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)