SAND-Lab / MEA-NAP

MEA-NAP. A streamlined diagnostic and analytic tool for data obtained using microelectrode arrays.
GNU General Public License v3.0
12 stars 6 forks source link

Colorbar axis incorrectly labelled in output: 4_NetworkActivity\4A_IndividualNetworkAnalysis\"Group Name"\"Lag"\3-5_MEA_NetworkPlotNode degreeBetweeness centrality/Participation coefficient/Node strengthlocal connectivity #7

Closed EliseChang closed 2 years ago

EliseChang commented 2 years ago

Brief description of problem:

For some recordings, the colorbar axis on the MEA grid plots where colour is plotted by one of the network metrics (betweeness centrality, participation coefficient or local connectivity) is incorrectly labelled, and often does not uniformly increase

Details, and how to reproduce the problem:

Seems to be more often mislabelled at 0 position, but not always:

4_MEA_NetworkPlotNode degreeParticipation coefficient

3_MEA_NetworkPlotNode degreeBetweeness centrality

Code in which bug occurs is: NetMet = ExtractNetMetOrganoid(adjMs,Params.FuncConLagval,Info,HomeDir,Params);

Proposed solution:

None, please debug

Timothysit commented 2 years ago

Hi Elise,

Both issues should be fixed in the commit here: 1b5873b8a37626f88bcf699597051b5a17dc7f43

The issue with the first plot is because the previous code determine the tick labels as a fraction of the max value of the network metric, without taking account of the min value (except in the lowest tick). The issue with the second plot is because the previous code rounds all network metrics to 2 decimal places, I have changed the code so that the rounding decimal places is dependent in the min and max value.

Example before (top) and after (bottom): image image

Let me know if this works for your plots and if so I will close this issue.

Timothysit commented 2 years ago

Close for now due to inactivity, please re-open if the issue persists after the fix.