Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix axes generation when num_axes is odd and figure is passed #926

Merged
merged 4 commits into from Sep 5, 2022

Conversation

alejoe91
Copy link
Member

@alejoe91 alejoe91 commented Sep 3, 2022

@samuelgarcia this fixes a bug that was caused by initializing the axes with np.zeros.

In case num_axes is odd, we still have to generate all nrows * ncols axes and then remove the excess ones (like it's done when not passing the figure). This bug was triggering an error because in other functions we assume (correctly) that all axes are mpl axes.

We should merge this and release 0.95.1 otherwise the plot_unit_templates and plot_unit_waveforms is broken.

Note that it worked when num_units is divisible by ncols.

@samuelgarcia samuelgarcia merged commit 389008f into SpikeInterface:master Sep 5, 2022
@alejoe91 alejoe91 deleted the fix_mpl_axes branch September 8, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants