Skip to content

Commit 93b1c25

Browse files
committed
Fix color scale issue.
1 parent 72db833 commit 93b1c25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/brainplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def prepare_data(*values):
105105
def brain_plot(*values, vmax, vmin, cmap=None, medial_wall_color=[0.8, 0.8, 0.8, 1.0], background_color=[1.0, 1.0, 1.0, 0.0], return_scale=False, surf_type='inflated'):
106106
values = prepare_data(*values)
107107
nan_mask = np.isnan(values)
108-
r = (vmax - values) / (vmax - vmin)
108+
r = (values - vmin) / (vmax - vmin)
109109
r = np.clip(r, 0.0, 1.0)
110110
cmap = cm.get_cmap(cmap)
111111
c = cmap(r)

0 commit comments

Comments
 (0)