Plot source estimates obtained with sparse solver. Active dipoles are represented in a "Glass" brain. If the same source is active in multiple source estimates it is displayed with a sphere otherwise with a cone in 3D. Parameters ---------- src : dict The source spa
(
src,
stcs,
colors=None,
linewidth=2,
fontsize=18,
bgcolor=(0.05, 0, 0.1),
opacity=0.2,
brain_color=(0.7,) * 3,
show=True,
high_resolution=False,
fig_name=None,
fig_number=None,
labels=None,
modes=("cone", "sphere"),
scale_factors=(1, 0.6),
verbose=None,
**kwargs,
)
| 3441 | |
| 3442 | @verbose |
| 3443 | def plot_sparse_source_estimates( |
| 3444 | src, |
| 3445 | stcs, |
| 3446 | colors=None, |
| 3447 | linewidth=2, |
| 3448 | fontsize=18, |
| 3449 | bgcolor=(0.05, 0, 0.1), |
| 3450 | opacity=0.2, |
| 3451 | brain_color=(0.7,) * 3, |
| 3452 | show=True, |
| 3453 | high_resolution=False, |
| 3454 | fig_name=None, |
| 3455 | fig_number=None, |
| 3456 | labels=None, |
| 3457 | modes=("cone", "sphere"), |
| 3458 | scale_factors=(1, 0.6), |
| 3459 | verbose=None, |
| 3460 | **kwargs, |
| 3461 | ): |
| 3462 | """Plot source estimates obtained with sparse solver. |
| 3463 | |
| 3464 | Active dipoles are represented in a "Glass" brain. |
| 3465 | If the same source is active in multiple source estimates it is |
| 3466 | displayed with a sphere otherwise with a cone in 3D. |
| 3467 | |
| 3468 | Parameters |
| 3469 | ---------- |
| 3470 | src : dict |
| 3471 | The source space. |
| 3472 | stcs : instance of SourceEstimate or list of instances of SourceEstimate |
| 3473 | The source estimates. |
| 3474 | colors : list |
| 3475 | List of colors. |
| 3476 | linewidth : int |
| 3477 | Line width in 2D plot. |
| 3478 | fontsize : int |
| 3479 | Font size. |
| 3480 | bgcolor : tuple of length 3 |
| 3481 | Background color in 3D. |
| 3482 | opacity : float in [0, 1] |
| 3483 | Opacity of brain mesh. |
| 3484 | brain_color : tuple of length 3 |
| 3485 | Brain color. |
| 3486 | show : bool |
| 3487 | Show figures if True. |
| 3488 | high_resolution : bool |
| 3489 | If True, plot on the original (non-downsampled) cortical mesh. |
| 3490 | fig_name : str |
| 3491 | PyVista figure name. |
| 3492 | fig_number : int |
| 3493 | Matplotlib figure number. |
| 3494 | labels : ndarray or list of ndarray |
| 3495 | Labels to show sources in clusters. Sources with the same |
| 3496 | label and the waveforms within each cluster are presented in |
| 3497 | the same color. labels should be a list of ndarrays when |
| 3498 | stcs is a list ie. one label for each stc. |
| 3499 | modes : list |
| 3500 | Should be a list, with each entry being ``'cone'`` or ``'sphere'`` |