Hello, I’m using the mne_connectivity method plot_sensors_connectivity and I’m getting the output shown below. However, I’ve noticed that not all the connections are represented and the colorbar has a value range defined.
Is there a way to tell the mne method that I would like to visualize all the connections and therefore, change the range of values of the color bar?
Second but not least, can I change the colors of the colorbar?
My code was based on the example given by MNE itself https://mne.tools/mne-connectivity/dev/auto_examples/sensor_connectivity.html#sphx-glr-auto-examples-sensor-connectivity-py
My procedure:
Data acquired with 9 electrodes.
After I calculate the coherence and I got the (81,2) array I’m asigning a variable to the alpha band and another one to the beta band.
The new alpha and beta arrays (9,9) have values ranged from 0.0 to 1.0
scene = plot_sensors_connectivity(epoc_1s.info, mc_alfa_coh)
scene.plotter.scalar_bar.GetLookupTable().apply_cmap("viridis")
then you can change the colormap of the bar, but this won’t affect the color of the lines connecting the sensors. I doubt changing both tubes and colorbar after rendering will be easy (or even possible?) so we would need to expose a new option plot_sensors_connectivity(..., cmap="RdBu") for it to work. If you want to try to hack it locally, you would need to add the new cmap param to the function signature, and then pass it through to renderer.tube() here:
cc @larsoner who might know the trick to changing it after rendering.