Use different types of surface#

By default brain_plot uses the inflated surface. This can be changed to the pial, white, or midthickness (average of pial and white) surface using the surf_type parameter.

../_images/different_surfaces_3_0.png
import numpy as np
from brainplotlib import brain_plot
import matplotlib.pyplot as plt

rng = np.random.default_rng(0)
v = rng.random((1175, ))
fig, axs = plt.subplots(2, 2, dpi=300, figsize=([_/300 + 1 for _ in [1728, 1560]]))
surf_types = ['inflated', 'midthickness', 'pial', 'white']
for i in range(2):
    for j in range(2):
        ax = axs[i][j]
        surf_type = surf_types[i*2+j]
        img = brain_plot(v, vmax=1, vmin=0, cmap='rainbow', surf_type=surf_type)
        ax.imshow(img)
        ax.axis('off')
        ax.set_title(f'{surf_type} surface')
plt.show()

<< Go back to the gallery of examples