add_glassbrain
add_glassbrain(
fig,
hemisphere=None,
colour='#CCCCCC',
opacity=0.3,
surface='inflated',
)Add a transparent glass brain mesh for context.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| fig | go.Figure | The plotly figure to add glassbrain to. | required |
| hemisphere | str | list[str] | None | Hemisphere(s) to add: ‘left’, ‘right’, or list of both. None adds both hemispheres. | None |
| colour | str | Color of the glass brain surface. | '#CCCCCC' |
| opacity | float | Transparency level (0-1). Default is 0.3. | 0.3 |
| surface | str | Surface type: ‘inflated’, ‘pial’, ‘white’, or ‘semi_inflated’. | 'inflated' |
Returns
| Name | Type | Description |
|---|---|---|
| go.Figure | The modified figure (allows chaining). |
Examples
>>> fig = ggseg3d(atlas=aseg())
>>> fig = add_glassbrain(fig, opacity=0.1)
>>> fig = pan_camera(fig, "left lateral")Use different brain surfaces:
>>> fig = add_glassbrain(fig, surface="pial")
>>> fig = add_glassbrain(fig, surface="white")