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

Add a note on fig.mne.colorbar in the docs of plot_connectivity_circle #266

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Enhancements
- Add support for computing multiple components of multivariate connectivity in the :func:`~mne_connectivity.spectral_connectivity_epochs` and :func:`~mne_connectivity.spectral_connectivity_time` functions and :class:`~mne_connectivity.decoding.CoherencyDecomposition` class, and add support for storing data with a components dimension in all :class:`~mne_connectivity.Connectivity` classes, by `Thomas Binns`_ and `Eric Larson`_ (:pr:`213`).
- Add support for :class:`mne.time_frequency.EpochsSpectrum` objects to be passed as data to the :func:`~mne_connectivity.spectral_connectivity_epochs` function, by `Thomas Binns`_ and `Eric Larson`_ (:pr:`220`).
- Update the cross-references for relevant functions and classes and make data types more explicit throughout the documentation, by `Thomas Binns`_ (:pr:`214`).
- Add the possibility to access the :class:`Colorbar <matplotlib.colorbar.Colorbar>` object when plotting connectivity using :func:`~mne_connectivity.viz.plot_connectivity_circle`, by `Santeri Ruuskanen`_ (:pr:`266`).

Bug
~~~
Expand All @@ -47,6 +48,7 @@ Authors
* `Marijn van Vliet`_
* `Eric Larson`_
* `Daniel McCloy`_
* `Santeri Ruuskanen`_

:doc:`Find out what was new in previous releases <whats_new_previous_releases>`

Expand Down
6 changes: 5 additions & 1 deletion examples/mne_inverse_label_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@
n_lines=300,
node_angles=node_angles,
node_colors=label_colors,
title="All-to-All Connectivity left-Auditory " "Condition (PLI)",
title="All-to-All Connectivity left-Auditory " "Condition",
ax=ax,
show=False
)
# Add a colorbar label
fig.mne.colorbar.set_label('PLI', color='w', fontsize=10)
fig.tight_layout()
fig.show()

###############################################################################
# Make multiple connectivity plots in the same figure
Expand Down
3 changes: 3 additions & 0 deletions mne_connectivity/viz/circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def plot_connectivity_circle(

If ``facecolor`` is not set via :func:`matplotlib.pyplot.savefig`, the
figure labels, title, and legend may be cut off in the output figure.

If ``colorbar=True``, the :class:`Colorbar <matplotlib.colorbar.Colorbar>`
object will be accessible via ``fig.mne.colorbar``.
"""
from mne_connectivity.base import BaseConnectivity

Expand Down
Loading