Skip to content

stc.plot setting initial_time not working with time_viewer=True (PyVista) #7379

Closed

Description

@SophieHerbst

There is something wrong with setting the initial time for an stc.plot with time_viewer=True (PyVista), it always defaults to the same value. I updated to the latest developers version, but the problem persists. @GuillaumeFavelier, maybe you know why?

import mne

mne.viz.set_3d_backend('pyvista')

data_dir = mne.datasets.sample.data_path('/volatile')
subjects_dir = data_dir + '/subjects'
stc_path = data_dir + '/MEG/sample/sample_audvis-meg-eeg'

stc = mne.read_source_estimate(stc_path, 'sample')

# First, morph the data to fsaverage_sym, for which we have left_right
# registrations:
stc = mne.compute_source_morph(stc, 'sample', 'fsaverage_sym', smooth=5,
                               warn=False,
                               subjects_dir=subjects_dir).apply(stc)

stc.plot(hemi='split', subjects_dir=subjects_dir, initial_time=0.,
          size=(800, 600),time_viewer=True)

pyvista_initial_time

Activity

  1. GuillaumeFavelier commented on Mar 4, 2020

    @GuillaumeFavelier
    Contributor

    This is definitely a bug, I will report it in #7162 and investigate this. Thanks for reporting @SophieHerbst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions