stc.plot - colorbar problem

Hi! :slight_smile:
I am trying to do some stc plots but I have problem with colorbar.
Code:
brain = stc.plot(clim=dict(kind=‘percent’, lims=[30, 45, 60]),colorbar=True,transparent=True,subjects_dir=subjects_dir, views=‘dorsal’, hemi=‘both’,background=‘white’,smoothing_steps=25, time_label=‘wPLI’)
It shows colors in the strange way. Can you help me how can I fix it?

Best,
Marta

mne.sys_info()
Platform: Windows-10-10.0.19042-SP0
Python: 3.9.6

mne: 0.23.0
numpy: 1.21.0 {blas=NO_ATLAS_INFO, lapack=lapack}
scipy: 1.7.0
matplotlib: 3.4.2 {backend=module://matplotlib_inline.backend_inline}

sklearn: 0.24.2
numba: 0.53.1
nibabel: 3.2.1
nilearn: 0.8.0
dipy: 1.4.1
cupy: Not found
pandas: 1.3.0
mayavi: 4.7.2
pyvista: 0.31.3 {pyvistaqt=0.5.0, OpenGL 4.5.0 - Build 27.20.100.8935 via Intel(R) Iris(R) Plus Graphics}
vtk: 9.0.1
PyQt5: 5.12.3

cc @GuillaumeFavelier, who might know what’s going on :blush:

1 Like

can you share a full snippet to replicate?

is it a problem you see with an stc plot on your system?

Alex

Yes I can see this problem with all stc plots

threshold_prop = 0.20  

degree = mne.connectivity.degree(con_s, threshold_prop=threshold_prop)

stc = mne.labels_to_stc(labels_parc, degree)

brain = stc.plot(

    clim=dict(kind='value', pos_lims=[0.5, 0.6, 0.7]),colormap='bwr',colorbar=True,transparent=True,

    subjects_dir=subjects_dir, views='dorsal', hemi='both',background='white',

    smoothing_steps=25)

Marta

then it’s an install problem or a problem on your system.

Alex

ok, thanks for help Alex! :slight_smile:

Marta

@mkkubins Did you install everything according to the official installation instructions?

Can you check if your system’s graphics card drivers are up to date?

I checked this and it is updated. I will reinstall my system and if it still be a issue I will post it here again :slight_smile:

Hello @mkkubins, are you still experiencing this issue?

Hi @richard! I haven’t had time to reinstall my system, I will do it next week and let you know :slight_smile: but with my previous system yes

Would you be willing to try a pre-release of an MNE-Python installer package I’ve created? It might help fix your issue. (And it if doesn’t … you can still try to reinstall everything :))

It would be the Windows installer here (I haven’t tried it yet, since I don’t have a Windows machine!!):

Let me know how that goes :slight_smile:

Sure I will try later this week and let you know :slight_smile:

1 Like

I have tried to download it and isntall but the issue still occurs

Do you think you could share a reproducible example (including the data) with me? Via Google Drive, Dropbox, Weshare, …

My email address is richard.hochenberger@gmail.com

Sorry for late response, I have send you email :slight_smile:

I have just seen message that this email is not correct, can you check this?

Whoops, sorry, there was a typo in my address! The correct address is:

richard.hoechenberger@gmail.com

I’ve received your email and will have a look. Thanks!

Thats great, thanks a lot ! :slight_smile: