mne-tools / mne-connectivity

Connectivity algorithms that leverage the MNE-Python API.
https://mne.tools/mne-connectivity/dev/index.html
BSD 3-Clause "New" or "Revised" License
66 stars 34 forks source link

Fix code-block #89

Closed alexrockhill closed 2 years ago

alexrockhill commented 2 years ago

Typo I missed

alexrockhill commented 2 years ago

So there's also some overlap of the colorbars but it should look perfect after https://github.com/mne-tools/mne-python/pull/10443

alexrockhill commented 2 years ago

Ok done messing with stuff, this is really all the fixes

alexrockhill commented 2 years ago

So the colorbar is all messed up because https://github.com/mne-tools/mne-python/pull/10443 needs to stop the colorbar from being removed from gridspec. That can be added back after the 1.0 release. Right now on main, the title overlaps so it's really not great either way, will be totally fixed soon.

adam2392 commented 2 years ago

Looks like circleCI is failing.

alexrockhill commented 2 years ago

Looks like circleCI is failing.

Sorry! It looks like it was an extra space # .. code-block not # .. code-block, dang.

Okay, once https://github.com/mne-tools/mne-python/pull/10443 merges, there will be errors if colorbar_scale and colorbar_pos are None so I just wrapped that in a try-catch and changed them to None defaults. That is nice for maintainability to have those as None so we don't have to change them in both mne.viz.circle._plot_connectivity_circle and in mne-connectivity if we want to change their values, and I'm not sure the rationale for overriding the matplotlib defaults. We could keep the small colorbar as a default but it's much better not to have gridspec=False for the colorbar so that it doesn't clash with the plots when you try and subplots_adjust or tight_layout.

alexrockhill commented 2 years ago

Ok, I think I was overthinking it, this just fixes those tiny leftovers and hopefully I did the code-block right this time

alexrockhill commented 2 years ago

The colorbar is still overlapped with the plot here https://508-369628653-gh.circle-artifacts.com/0/dev/auto_examples/mixed_source_space_connectivity.html#sphx-glr-auto-examples-mixed-source-space-connectivity-py but that will be fixed when https://github.com/mne-tools/mne-python/pull/10443 merges.