brain-slam / slam

Surface anaLysis And Modeling
MIT License
14 stars 24 forks source link

Adding the clim parameter in the visbrain_plot function #69

Closed maximedieudonne closed 3 years ago

maximedieudonne commented 3 years ago

The clim parameter in the visbrain_plot function set the min and the max of the color bar. by default the clim is set as : b_obj.add_activation(data=tex, cmap=cmap, clim=(np.min(tex), np.max(tex)))

it could be usefull to add this setting in the inputs of the function in the case for example you want to compare two or more plots.

maximedieudonne commented 3 years ago

here is my proposition of change :

add the setting clim in the inputs with None by default : def visbrain_plot(mesh, tex=None, caption=None, cblabel=None, visb_sc=None, clim = None, cmap='jet'):

then make a if condition : if tex is not None: if clim is None: b_obj.add_activation(data=tex, cmap=cmap,clim=(np.min(tex), np.max(tex))) else: b_obj.add_activation(data=tex, cmap=cmap, clim=clim)

alexpron commented 3 years ago

PR merged, I close this issue