sccn / roiconnect

ROI connectivity analysis in EEG
39 stars 17 forks source link

How do I change the range of clim in pop_roi_connectplot? #83

Closed sato16 closed 4 months ago

sato16 commented 4 months ago

Dear roiconnect developer,

I would like to adjust the the range of "clim" to compare multiple plots of "plotcortex" in pop_roi_connectplot function. However, it seems that only the color of the color bar changes when the clim is stated. Is there any good solution to this problem?

pop_roi_connectplot(EEG, 'measure', 'MIM', 'plotcortex', 'on', 'plotmatrix', 'off', 'plotbutterfly', 'off');  
before_plot
pop_roi_connectplot(EEG, 'measure', 'MIM', 'plotcortex', 'on', 'plotmatrix', 'off', 'plotbutterfly', 'off');  
clim([0 1])
after_add_clim

Thank you in advance. Best regards, Fumiaki

nguyen-td commented 4 months ago

Hi Fumiaki,

Thanks for your question. You could navigate into the pop_roi_connectplot function and replace the third parameter [min(cortexPlot) max(cortexPlot)] with [0 1]: https://github.com/sccn/roiconnect/blob/81336ddc84d0c21e1bb6c28a74e9817efcc95285/pop_roi_connectplot.m#L574

We haven't thought about this use case yet, even though it seems so basic so thanks for bringing it up! I will put it on my To-Do list to implement a more elegant solution.

sato16 commented 4 months ago

Dear Tien, Thank you for your quick response! Sure, I will adopt this solution. It would be helpful if you could consider passing the figure handle as the output, or "clim" as the optional input in the future implementation. Thank you for your help. Fumiaki