@@ -37,12 +37,9 @@ def make_figure(braindata, recache=False, pixelwise=True, thick=32, sampler='nea
3737 labelsize = None , labelcolor = None , cutout = None , curvature_brightness = None ,
3838 curvature_contrast = None , curvature_threshold = None , fig = None , extra_hatch = None ,
3939 colorbar_ticks = None , colorbar_location = 'center' , roi_list = None , sulci_list = None ,
40- nanmean = False , ** kwargs ):
40+ nanmean = False ):
4141 """Show a Volume or Vertex on a flatmap with matplotlib.
4242
43- Note that **kwargs are ONLY present now for backward compatibility / warnings. No kwargs
44- should be used.
45-
4643 Parameters
4744 ----------
4845 braindata : Dataview (e.g. instance of cortex.Volume, cortex.Vertex,...)
@@ -96,10 +93,10 @@ def make_figure(braindata, recache=False, pixelwise=True, thick=32, sampler='nea
9693 curvature_contrast : float, optional
9794 Contrast of curvature. 1 = maximal contrast (black/white), 0 = no contrast (solid color for
9895 curvature equal to `curvature_brightness`).
99- cvmax : float , optional [DEPRECATED! use `curvature_brightness` and `curvature_contrast` instead]
100- Maximum value for background curvature colormap. Defaults to config file value.
101- cvthr : bool, optional [DEPRECATED! use `curvature_threshold` instead]
102- Apply threshold to background curvature
96+ curvature_threshold : bool , optional
97+ Whether to apply a threshold to the curvature values to create a binary curvature image
98+ (one shade for positive curvature, one shade for negative). `None` defaults to value
99+ specified in the config file
103100 extra_disp : tuple, optional
104101 Optional extra display layer from external .svg file. Tuple specifies (filename, layer)
105102 filename should be a full path. External svg file should be structured exactly as
@@ -147,32 +144,15 @@ def make_figure(braindata, recache=False, pixelwise=True, thick=32, sampler='nea
147144 layers = dict (data = data_im )
148145 # Add curvature
149146 if with_curvature :
150- # backward compatibility
151- if any ([x in kwargs for x in ['cvmin' , 'cvmax' , 'cvthr' ]]):
152- import warnings
153- warnings .warn (("Use of `cvmin`, `cvmax`, and `cvthr` is deprecated! Please use \n "
154- "`curvature_brightness`, `curvature_contrast`, and `curvature_threshold`\n "
155- "to set appearance of background curvature." ))
156- legacy_mode = True
157- if ('cvmin' in kwargs ) and ('cvmax' in kwargs ):
158- # Assumes that if one is specified, both are; weird case where only one is
159- # specified will still break.
160- curvature_lims = (kwargs .pop ('cvmin' ), kwargs .pop ('cvmax' ))
161- else :
162- curvature_lims = 0.5
163- if 'cvthr' in kwargs :
164- curvature_threshold = kwargs .pop ('cvthr' )
165- else :
166- curvature_lims = 0.5
167- legacy_mode = False
168147 curv_im = composite .add_curvature (ax , dataview , extents ,
169148 brightness = curvature_brightness ,
170149 contrast = curvature_contrast ,
171150 threshold = curvature_threshold ,
172- curvature_lims = curvature_lims ,
173- legacy_mode = legacy_mode ,
151+ curvature_lims = 0.5 ,
152+ legacy_mode = False ,
174153 recache = recache )
175154 layers ['curvature' ] = curv_im
155+
176156 # Add dropout
177157 if with_dropout is not False :
178158 # Support old api:
0 commit comments