@@ -893,10 +893,10 @@ def plot_swanson_vector(acronyms=None, values=None, ax=None, hemisphere=None, br
893893
894894 if acronyms is not None :
895895 ibr , vals = br .propagate_down (acronyms , values )
896- colormap = matplotlib . colormaps .get_cmap (cmap )
896+ colormap = cm .get_cmap (cmap )
897897 vmin = vmin or np .nanmin (vals )
898898 vmax = vmax or np .nanmax (vals )
899- norm = matplotlib . colors .Normalize (vmin = vmin , vmax = vmax )
899+ norm = colors .Normalize (vmin = vmin , vmax = vmax )
900900 rgba_color = colormap (norm (vals ), bytes = True )
901901
902902 if mask is not None :
@@ -1090,7 +1090,7 @@ def plot_swanson(acronyms=None, values=None, ax=None, hemisphere=None, br=None,
10901090 br = BrainRegions () if br is None else br
10911091 br .compute_hierarchy ()
10921092 s2a = swanson ()
1093- # both hemishpere
1093+ # both hemispheres
10941094 if hemisphere == 'both' :
10951095 _s2a = s2a + np .sum (br .id > 0 )
10961096 _s2a [s2a == 0 ] = 0
@@ -1120,7 +1120,7 @@ def plot_swanson(acronyms=None, values=None, ax=None, hemisphere=None, br=None,
11201120 imb = np .zeros ((* s2a .shape [:2 ], 4 ), dtype = np .uint8 )
11211121 # fill in the empty regions with the blank regions colours if necessary
11221122 if iswan is not None :
1123- imb [~ iswan ] = (np .array (matplotlib . colors .to_rgba (empty_color )) * 255 ).astype ('uint8' )
1123+ imb [~ iswan ] = (np .array (colors .to_rgba (empty_color )) * 255 ).astype ('uint8' )
11241124 imb [s2a == 0 ] = 255
11251125 # imb[s2a == 1] = np.array([167, 169, 172, 255])
11261126 imb [s2a == 1 ] = np .array ([0 , 0 , 0 , 255 ])
0 commit comments