Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add figure of harmonization parameters #125

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Conversation

melhemr
Copy link
Contributor

@melhemr melhemr commented Dec 3, 2021

This will add a scrollable table of harmonization parameters to the Harmonization tab

@melhemr
Copy link
Contributor Author

melhemr commented Dec 3, 2021

To do:

  • fix alignment to match with boxplot figures
  • move parameter numbers slightly above error bar
  • plot boxes over lines
  • pooled var?

@AbdulkadirA
Copy link
Contributor

@melhemr Instead of showing the parameters for all ROIs in the table, how about only showing those for that specific ROI? This could be written into the site label, e.g.

ABC; N=106; g=-0.11; d=0.89
ADNI1; N=234; g=0.09; d=0.97
...

@melhemr melhemr force-pushed the parameters branch 2 times, most recently from 444ee17 to 3e6b87f Compare December 6, 2021 03:44
@AbdulkadirA
Copy link
Contributor

@melhemr Although the PR is not ready, I quickly ran the code and got following error message. Hope this is useful.

Traceback (most recent call last):
  File "c:\users\[REDACTED]\istaging-tools\QtBrainChartGUI\plugins\harmonization\harmonization.py", line 190, in UpdatePlot
    self.plotMUSE(plotOptions)
  File "c:\users\[REDACTED]\istaging-tools\QtBrainChartGUI\plugins\harmonization\harmonization.py", line 288, in plotMUSE
    a.set_yticklabels(labels)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axes\_base.py", line 73, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\_api\deprecation.py", line 471, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axis.py", line 1790, in _set_ticklabels
    return self.set_ticklabels(labels, minor=minor, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axis.py", line 1711, in set_ticklabels
    raise ValueError(
ValueError: The number of FixedLocator locations (20), usually from a call to set_ticks, does not match the number of ticklabels (17).

@melhemr melhemr force-pushed the parameters branch 2 times, most recently from c5417c9 to 4d7b89f Compare December 7, 2021 19:20
@melhemr melhemr changed the title Add table of harmonization parameters Add figure of harmonization parameters Dec 7, 2021
@melhemr
Copy link
Contributor Author

melhemr commented Dec 7, 2021

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

@AbdulkadirA
Copy link
Contributor

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

How about setting ylim to the same values as in the other axes? Also linking axes should help: https://datavizpyr.com/seaborn-join-two-plots-with-shared-y-axis/

@melhemr
Copy link
Contributor Author

melhemr commented Dec 7, 2021

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

How about setting ylim to the same values as in the other axes? Also linking axes should help: https://datavizpyr.com/seaborn-join-two-plots-with-shared-y-axis/

@AbdulkadirA thanks! I was able to fix the alignment of the parameter plot to match the other two

@melhemr melhemr marked this pull request as ready for review December 7, 2021 20:55
Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

@AbdulkadirA AbdulkadirA merged commit 90e7ec3 into CBICA:main Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants