netneurotools.plotting.pv_plot_surface
- netneurotools.plotting.pv_plot_surface(vertex_data, template, surf='inflated', hemi='both', layout='default', mask_medial=True, cmap='viridis', clim=None, zoom_ratio=1.0, show_colorbar=True, cbar_title=None, show_plot=True, jupyter_backend='html', lighting_style='default', save_fig=None, plotter_kws=None, mesh_kws=None, cbar_kws=None, silhouette_kws=None, data_dir=None, verbose=0)[source]
Plot surface data using PyVista.
- Parameters:
vertex_data (array-like or tuple of array-like) – Data array(s) to be plotted on the surface. If hemi is “both”, this should be a tuple of two arrays. Otherwise, a single array.
template (str) – Template to use for plotting. Options include ‘fsaverage’, ‘fsaverage6’, ‘fsaverage5’, ‘fsaverage4’, ‘fslr4k’, ‘fslr8k’, ‘fslr32k’, ‘fslr164k’, ‘civet41k’, ‘civet164k’.
surf (str, optional) – Surface to plot. Default is ‘inflated’.
hemi (str, optional) – Hemisphere to plot. Options include ‘L’, ‘R’, ‘both’. Default is ‘both’.
layout (str, optional) – Layout of the plot. Options include ‘default’, ‘single’, ‘row’, ‘column’. Default is ‘default’.
mask_medial (bool, optional) – Mask medial wall. Default is True.
cmap (str, optional) – Colormap to use. Default is ‘viridis’.
clim (tuple, optional) – Colorbar limits. If None, will be set to 2.5th and 97.5th percentiles. Default is None.
zoom_ratio (float, optional) – Zoom ratio for the camera. Default is 1.0.
show_colorbar (bool, optional) – Whether to show the colorbar. Default is True.
cbar_title (str, optional) – Title for the colorbar. Default is None.
show_plot (bool, optional) – Whether to show the plot. Default is True.
jupyter_backend (str, optional) – Jupyter backend to use. See PyVista documentation for more details. Default is ‘html’.
lighting_style (str, optional) – Lighting style to use. Options include ‘default’, ‘lightkit’, ‘threelights’, ‘silhouette’, ‘metallic’, ‘plastic’, ‘shiny’, ‘glossy’, ‘ambient’, ‘plain’. Default is ‘default’.
save_fig (str or Path, optional) – Path (include file name) to save the figure. Default is None.
- Returns:
pl – PyVista plotter object.
- Return type:
- Other Parameters:
plotter_kws (dict, optional) – Additional keyword arguments to pass to the PyVista plotter. Default is None.
mesh_kws (dict, optional) – Additional keyword arguments to pass to the PyVista mesh. Default is None.
cbar_kws (dict, optional) – Additional keyword arguments to pass to the PyVista colorbar. Default is None.
silhouette_kws (dict, optional) – Additional keyword arguments to pass to the PyVista silhouette. Default is None.
data_dir (str or Path, optional) – Path to use as data directory. If not specified, will check for environmental variable ‘NNT_DATA’; if that is not set, will use ~/nnt-data instead. Default: None
verbose (int, optional) – Modifies verbosity of download, where higher numbers mean more updates. Default: 0