Build plotter 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), **kwargs)
| 100 | |
| 101 | |
| 102 | def build_plotter(surfs, layout, array_name=None, view=None, color_bar=None, |
| 103 | color_range=None, share=False, label_text=None, |
| 104 | cmap='viridis', nan_color=(0, 0, 0, 1), zoom=1, |
| 105 | background=(1, 1, 1), size=(400, 400), **kwargs): |
| 106 | """Build plotter arranged according to the `layout`. |
| 107 | |
| 108 | Parameters |
| 109 | ---------- |
| 110 | surfs : dict[str, BSPolyData] |
| 111 | Dictionary of surfaces. |
| 112 | layout : array-like, shape = (n_rows, n_cols) |
| 113 | Array of surface keys in `surfs`. Specifies how window is arranged. |
| 114 | array_name : array-like, optional |
| 115 | Names of point data array to plot for each layout entry. |
| 116 | Use a tuple with multiple array names to plot multiple arrays |
| 117 | (overlays) per layout entry. Default is None. |
| 118 | view : array-like, optional |
| 119 | View for each each layout entry. Possible views are {'lateral', |
| 120 | 'medial', 'ventral', 'dorsal'}. If None, use default view. |
| 121 | Default is None. |
| 122 | color_bar : {'left', 'right', 'top', 'bottom'} or None, optional |
| 123 | Location where color bars are rendered. If None, color bars are not |
| 124 | included. Default is None. |
| 125 | color_range : {'sym'}, tuple or sequence. |
| 126 | Range for each array name. If 'sym', uses a symmetric range. Only used |
| 127 | if array has positive and negative values. Default is None. |
| 128 | share : {'row', 'col', 'both'} or bool, optional |
| 129 | If ``share == 'row'``, point data for surfaces in the same row share |
| 130 | same data range. If ``share == 'col'``, the same but for columns. |
| 131 | If ``share == 'both'``, all data shares same range. If True, similar |
| 132 | to ``share == 'both'``. Default is False. |
| 133 | label_text : dict[str, array-like], optional |
| 134 | Label text for column/row. Possible keys are {'left', 'right', |
| 135 | 'top', 'bottom'}, which indicate the location. Default is None. |
| 136 | cmap : str or sequence of str, optional |
| 137 | Color map name (from matplotlib) for each array name. |
| 138 | Default is 'viridis'. |
| 139 | nan_color : tuple |
| 140 | Color for nan values. Default is (0, 0, 0, 1). |
| 141 | zoom : float or sequence of float, optional |
| 142 | Zoom applied to the surfaces in each layout entry. |
| 143 | background : tuple |
| 144 | Background color. Default is (1, 1, 1). |
| 145 | size : tuple, optional |
| 146 | Window size. Default is (400, 400). |
| 147 | kwargs : keyword-valued args |
| 148 | Additional arguments passed to the renderers, actors, mapper, color_bar |
| 149 | or plotter. Keywords starting with: |
| 150 | |
| 151 | - 'renderer__' are passed to the renderers. |
| 152 | - 'actor__' are passed to the actors. |
| 153 | - 'mapper__' are passed to the mappers. |
| 154 | - 'cb__' are passed to color bar actors. |
| 155 | - 'text__' are passed to color text actors. |
| 156 | |
| 157 | The rest of keywords are passed to the plotter. |
| 158 | |
| 159 | Returns |
no test coverage detected