MCPcopy Index your code
hub / github.com/danjgale/surfplot / plot_surf

Function plot_surf

surfplot/surf.py:338–453  ·  view source on GitHub ↗

Plot surfaces arranged according to the `layout`. Parameters ---------- surfs : dict[str, BSPolyData] Dictionary of surfaces. layout : array-like, shape = (n_rows, n_cols) Array of surface keys in `surfs`. Specifies how window is arranged. array_name : array-like

(surfs, layout, array_name=None, view=None, color_bar=None,
              color_range=None, share=False, label_text=None, cmap='viridis',
              nan_color=(0, 0, 0, 1), zoom=1, background=(1, 1, 1),
              size=(400, 400), embed_nb=False, interactive=True, scale=(1, 1),
              transparent_bg=True, screenshot=False, filename=None,
              return_plotter=False, **kwargs)

Source from the content-addressed store, hash-verified

336
337
338def plot_surf(surfs, layout, array_name=None, view=None, color_bar=None,
339 color_range=None, share=False, label_text=None, cmap='viridis',
340 nan_color=(0, 0, 0, 1), zoom=1, background=(1, 1, 1),
341 size=(400, 400), embed_nb=False, interactive=True, scale=(1, 1),
342 transparent_bg=True, screenshot=False, filename=None,
343 return_plotter=False, **kwargs):
344
345 """Plot surfaces arranged according to the `layout`.
346
347 Parameters
348 ----------
349 surfs : dict[str, BSPolyData]
350 Dictionary of surfaces.
351 layout : array-like, shape = (n_rows, n_cols)
352 Array of surface keys in `surfs`. Specifies how window is arranged.
353 array_name : array-like, optional
354 Names of point data array to plot for each layout entry.
355 Use a tuple with multiple array names to plot multiple arrays
356 (overlays) per layout entry. Default is None.
357 view : array-like, optional
358 View for each each layout entry. Possible views are {'lateral',
359 'medial', 'ventral', 'dorsal'}. If None, use default view.
360 Default is None.
361 color_bar : {'left', 'right', 'top', 'bottom'} or None, optional
362 Location where color bars are rendered. If None, color bars are not
363 included. Default is None.
364 color_range : {'sym'}, tuple or sequence.
365 Range for each array name. If 'sym', uses a symmetric range. Only used
366 if array has positive and negative values. Default is None.
367 share : {'row', 'col', 'both'} or bool, optional
368 If ``share == 'row'``, point data for surfaces in the same row share
369 same data range. If ``share == 'col'``, the same but for columns.
370 If ``share == 'both'``, all data shares same range. If True, similar
371 to ``share == 'both'``. Default is False.
372 label_text : dict[str, array-like], optional
373 Label text for column/row. Possible keys are {'left', 'right',
374 'top', 'bottom'}, which indicate the location. Default is None.
375 cmap : str or sequence of str, optional
376 Color map name (from matplotlib) for each array name.
377 Default is 'viridis'.
378 nan_color : tuple
379 Color for nan values. Default is (0, 0, 0, 1).
380 zoom : float or sequence of float, optional
381 Zoom applied to the surfaces in each layout entry.
382 background : tuple
383 Background color. Default is (1, 1, 1).
384 size : tuple, optional
385 Window size. Default is (400, 400).
386 interactive : bool, optional
387 Whether to enable interaction. Default is True.
388 embed_nb : bool, optional
389 Whether to embed figure in notebook. Only used if running in a
390 notebook. Default is False.
391 screenshot : bool, optional
392 Take a screenshot instead of rendering. Default is False.
393 filename : str, optional
394 Filename to save the screenshot. Default is None.
395 transparent_bg : bool, optional

Callers 1

renderMethod · 0.85

Calls 2

build_plotterFunction · 0.85
showMethod · 0.80

Tested by

no test coverage detected