question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: VectorSourceEstimate.plot() in v20 does not show the surfaces

See original GitHub issue

Describe the bug

VectorSourceEstimate.plot() is not working properly in v20.

Steps to reproduce

I used the sample dataset to compute some VectorSourceEstimate files to play around. Trouble shootings in Advanced setup of MNE-Python did not fix the problem.

import os.path as op
import mne
from scripts.config import baseline, meg_dir, subjects_dir

os.environ["SUBJECTS_DIR"] = subjects_dir
stc_aud = mne.read_source_estimate(
    op.join(meg_dir, 'aud_left_minus_right-grand_average-ave-stc'))
stc_aud.plot(hemi='both', initial_time=0.1)

Expected results

In MNE v19, it works without problems mne-19

Actual results

In MNE v20, the surfaces disappear after plotting. mne-20

The problem persists in master.

Additional information

If required, I can upload the source estimate file.

mne.sys_info

Platform:      Linux-5.6.8-200.fc31.x86_64-x86_64-with-fedora-31-Thirty_One
Python:        3.7.7 (default, Mar 13 2020, 10:23:39)  [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
Executable:    /home/yuhan/env/mne/bin/python
CPU:           x86_64: 4 cores
Memory:        15.5 GB

mne:           0.20.3
numpy:         1.17.3 {blas=openblas, lapack=openblas}
scipy:         1.3.2
matplotlib:    3.1.1 {backend=Qt5Agg}

sklearn:       0.21.3
numba:         0.46.0
nibabel:       2.5.1
cupy:          Not found
pandas:        0.25.3
dipy:          1.0.0
mayavi:        4.7.1 {qt_api=pyqt5, PyQt5=5.13.2}
pyvista:       0.24.1
vtk:           8.1.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
yh-luocommented, May 4, 2020

I’m closing this because it’s actually a problem of Fedora with NVIDIA Optimus laptop. Others may encounter the same Mayavi rendering problem so the solution is below:

  1. Install the proprietary nvidia driver
  2. Configure graphics applications to render using the NVIDIA GPU. Set the environment variable __NV_PRIME_RENDER_OFFLOAD=1 and __GLX_VENDOR_LIBRARY_NAME=nvidia before running graphical applications. Or set them in .bashrc
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia

I’m not sure if other Linux users have this problem with dual GPU laptops though.

0reactions
GuillaumeFaveliercommented, May 4, 2020

Thanks for sharing!

I’m not sure if other Linux users have this problem with dual GPU laptops though.

I used a slightly more complicated method on my Manjaro to get rid of those visual artifacts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mne.VectorSourceEstimate — MNE 1.3.dev0 documentation
Container for vector surface source estimates. For each vertex, the magnitude of the current is defined in the X, Y and Z directions....
Read more >
MATLAB fsurf - Plot 3-D surface - MathWorks
This MATLAB function creates a surface plot of the function z = f(x,y) over the ... If you do not specify an axes...
Read more >
NEWS
MCMCplot can now plot models that have NA for posterior estimates. ... MCMCpstr fix bug where dimensions were not displayed properly for Stan...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found