plotfig 0.0.6__tar.gz → 0.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {plotfig-0.0.6 → plotfig-0.0.7}/PKG-INFO +2 -1
  2. {plotfig-0.0.6 → plotfig-0.0.7}/plotfig.egg-info/PKG-INFO +2 -1
  3. plotfig-0.0.7/plotfig.egg-info/SOURCES.txt +76 -0
  4. {plotfig-0.0.6 → plotfig-0.0.7}/pyproject.toml +17 -5
  5. plotfig-0.0.7/src/plotfig/__init__.py +32 -0
  6. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/brain_connection_plot.py +52 -46
  7. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/brain_surface_plot.py +371 -20
  8. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/circos_plot.py +3 -3
  9. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/common_plot.py +58 -80
  10. plotfig-0.0.7/src/plotfig/data/atlas_tables/chimpanzee_bna.csv +201 -0
  11. plotfig-0.0.7/src/plotfig/data/neurodata/atlases/chimpanzee_BNA/ChimpBNA.L.32k_fs_LR.label.gii +259 -0
  12. plotfig-0.0.7/src/plotfig/data/neurodata/atlases/chimpanzee_BNA/ChimpBNA.R.32k_fs_LR.label.gii +18 -0
  13. plotfig-0.0.7/src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.L.midthickness.32k_fs_LR.surf.gii +224 -0
  14. plotfig-0.0.7/src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.L.veryinflated.32k_fs_LR.surf.gii +140 -0
  15. plotfig-0.0.7/src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.R.midthickness.32k_fs_LR.surf.gii +224 -0
  16. plotfig-0.0.7/src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.R.veryinflated.32k_fs_LR.surf.gii +140 -0
  17. plotfig-0.0.6/plotfig/__init__.py +0 -4
  18. plotfig-0.0.6/plotfig.egg-info/SOURCES.txt +0 -69
  19. {plotfig-0.0.6 → plotfig-0.0.7}/LICENSE +0 -0
  20. {plotfig-0.0.6 → plotfig-0.0.7}/README.md +0 -0
  21. {plotfig-0.0.6 → plotfig-0.0.7}/plotfig.egg-info/dependency_links.txt +0 -0
  22. {plotfig-0.0.6 → plotfig-0.0.7}/plotfig.egg-info/requires.txt +0 -0
  23. {plotfig-0.0.6 → plotfig-0.0.7}/plotfig.egg-info/top_level.txt +0 -0
  24. {plotfig-0.0.6 → plotfig-0.0.7}/setup.cfg +0 -0
  25. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/human_bna.csv +0 -0
  26. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/human_glasser.csv +0 -0
  27. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/macaque_bna.csv +0 -0
  28. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/macaque_charm5.csv +0 -0
  29. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/macaque_charm5_add_13_sgms.csv +0 -0
  30. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/atlas_tables/macaque_charm6.csv +0 -0
  31. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/human_BNA/fsaverage.L.BNA.32k_fs_LR.label.gii +0 -0
  32. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/human_BNA/fsaverage.R.BNA.32k_fs_LR.label.gii +0 -0
  33. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/human_Glasser/fsaverage.L.Glasser.32k_fs_LR.label.gii +0 -0
  34. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/human_Glasser/fsaverage.R.Glasser.32k_fs_LR.label.gii +0 -0
  35. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_BNA/MBNA_124_32k_L.label.gii +0 -0
  36. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_BNA/MBNA_124_32k_R.label.gii +0 -0
  37. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_CHARM5/L.charm5.label.gii +0 -0
  38. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_CHARM5/R.charm5.label.gii +0 -0
  39. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_CHARM6/L.charm6.label.gii +0 -0
  40. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/atlases/macaque_CHARM6/R.charm6.label.gii +0 -0
  41. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/README.md +0 -0
  42. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-nomedialwall_dparc.label.gii +0 -0
  43. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-sulc_midthickness.shape.gii +0 -0
  44. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-vaavg_midthickness.shape.gii +0 -0
  45. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_inflated.surf.gii +0 -0
  46. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_midthickness.surf.gii +0 -0
  47. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_sphere.surf.gii +0 -0
  48. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_veryinflated.surf.gii +0 -0
  49. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-nomedialwall_dparc.label.gii +0 -0
  50. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-sulc_midthickness.shape.gii +0 -0
  51. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-vaavg_midthickness.shape.gii +0 -0
  52. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_inflated.surf.gii +0 -0
  53. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_midthickness.surf.gii +0 -0
  54. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_sphere.surf.gii +0 -0
  55. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_veryinflated.surf.gii +0 -0
  56. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_space-fsaverage_den-32k_hemi-L_sphere.surf.gii +0 -0
  57. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_space-fsaverage_den-32k_hemi-R_sphere.surf.gii +0 -0
  58. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.inflated.32k_fs_LR.surf.gii +0 -0
  59. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.midthickness.32k_fs_LR.surf.gii +0 -0
  60. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.pial.32k_fs_LR.surf.gii +0 -0
  61. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.veryinflated.32k_fs_LR.surf.gii +0 -0
  62. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.white.32k_fs_LR.surf.gii +0 -0
  63. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.inflated.32k_fs_LR.surf.gii +0 -0
  64. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.midthickness.32k_fs_LR.surf.gii +0 -0
  65. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.pial.32k_fs_LR.surf.gii +0 -0
  66. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.veryinflated.32k_fs_LR.surf.gii +0 -0
  67. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.white.32k_fs_LR.surf.gii +0 -0
  68. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.gray_surface.inf_300.surf.gii +0 -0
  69. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.gray_surface.surf.gii +0 -0
  70. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.mid_surface.inf_300.surf.gii +0 -0
  71. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.mid_surface.surf.gii +0 -0
  72. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.white_surface.inf_300.surf.gii +0 -0
  73. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/L.white_surface.surf.gii +0 -0
  74. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.gray_surface.inf_300.surf.gii +0 -0
  75. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.gray_surface.surf.gii +0 -0
  76. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.mid_surface.inf_300.surf.gii +0 -0
  77. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.mid_surface.surf.gii +0 -0
  78. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.white_surface.inf_300.surf.gii +0 -0
  79. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/surfaces/macaque_NMT2/R.white_surface.surf.gii +0 -0
  80. {plotfig-0.0.6 → plotfig-0.0.7/src}/plotfig/data/neurodata/volumes/macaque_NMT2/CHARM5_add_13_sgms_asym.nii.gz +0 -0
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotfig
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Scientific plotting package for Cognitive neuroscience
5
5
  Author-email: Ricardo Ryn <ricardoRyn1317@gmail.com>
6
+ Keywords: neuroscience,plotting,visualization
6
7
  Requires-Python: >=3.11
7
8
  Description-Content-Type: text/markdown
8
9
  License-File: LICENSE
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotfig
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Scientific plotting package for Cognitive neuroscience
5
5
  Author-email: Ricardo Ryn <ricardoRyn1317@gmail.com>
6
+ Keywords: neuroscience,plotting,visualization
6
7
  Requires-Python: >=3.11
7
8
  Description-Content-Type: text/markdown
8
9
  License-File: LICENSE
@@ -0,0 +1,76 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ plotfig.egg-info/PKG-INFO
5
+ plotfig.egg-info/SOURCES.txt
6
+ plotfig.egg-info/dependency_links.txt
7
+ plotfig.egg-info/requires.txt
8
+ plotfig.egg-info/top_level.txt
9
+ src/plotfig/__init__.py
10
+ src/plotfig/brain_connection_plot.py
11
+ src/plotfig/brain_surface_plot.py
12
+ src/plotfig/circos_plot.py
13
+ src/plotfig/common_plot.py
14
+ src/plotfig/data/atlas_tables/chimpanzee_bna.csv
15
+ src/plotfig/data/atlas_tables/human_bna.csv
16
+ src/plotfig/data/atlas_tables/human_glasser.csv
17
+ src/plotfig/data/atlas_tables/macaque_bna.csv
18
+ src/plotfig/data/atlas_tables/macaque_charm5.csv
19
+ src/plotfig/data/atlas_tables/macaque_charm5_add_13_sgms.csv
20
+ src/plotfig/data/atlas_tables/macaque_charm6.csv
21
+ src/plotfig/data/neurodata/atlases/chimpanzee_BNA/ChimpBNA.L.32k_fs_LR.label.gii
22
+ src/plotfig/data/neurodata/atlases/chimpanzee_BNA/ChimpBNA.R.32k_fs_LR.label.gii
23
+ src/plotfig/data/neurodata/atlases/human_BNA/fsaverage.L.BNA.32k_fs_LR.label.gii
24
+ src/plotfig/data/neurodata/atlases/human_BNA/fsaverage.R.BNA.32k_fs_LR.label.gii
25
+ src/plotfig/data/neurodata/atlases/human_Glasser/fsaverage.L.Glasser.32k_fs_LR.label.gii
26
+ src/plotfig/data/neurodata/atlases/human_Glasser/fsaverage.R.Glasser.32k_fs_LR.label.gii
27
+ src/plotfig/data/neurodata/atlases/macaque_BNA/MBNA_124_32k_L.label.gii
28
+ src/plotfig/data/neurodata/atlases/macaque_BNA/MBNA_124_32k_R.label.gii
29
+ src/plotfig/data/neurodata/atlases/macaque_CHARM5/L.charm5.label.gii
30
+ src/plotfig/data/neurodata/atlases/macaque_CHARM5/R.charm5.label.gii
31
+ src/plotfig/data/neurodata/atlases/macaque_CHARM6/L.charm6.label.gii
32
+ src/plotfig/data/neurodata/atlases/macaque_CHARM6/R.charm6.label.gii
33
+ src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.L.midthickness.32k_fs_LR.surf.gii
34
+ src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.L.veryinflated.32k_fs_LR.surf.gii
35
+ src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.R.midthickness.32k_fs_LR.surf.gii
36
+ src/plotfig/data/neurodata/surfaces/chimpanzee_BNA/ChimpYerkes29_v1.2.R.veryinflated.32k_fs_LR.surf.gii
37
+ src/plotfig/data/neurodata/surfaces/human_fsLR/README.md
38
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-nomedialwall_dparc.label.gii
39
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-sulc_midthickness.shape.gii
40
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_desc-vaavg_midthickness.shape.gii
41
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_inflated.surf.gii
42
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_midthickness.surf.gii
43
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_sphere.surf.gii
44
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-L_veryinflated.surf.gii
45
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-nomedialwall_dparc.label.gii
46
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-sulc_midthickness.shape.gii
47
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_desc-vaavg_midthickness.shape.gii
48
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_inflated.surf.gii
49
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_midthickness.surf.gii
50
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_sphere.surf.gii
51
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_den-32k_hemi-R_veryinflated.surf.gii
52
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_space-fsaverage_den-32k_hemi-L_sphere.surf.gii
53
+ src/plotfig/data/neurodata/surfaces/human_fsLR/tpl-fsLR_space-fsaverage_den-32k_hemi-R_sphere.surf.gii
54
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.inflated.32k_fs_LR.surf.gii
55
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.midthickness.32k_fs_LR.surf.gii
56
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.pial.32k_fs_LR.surf.gii
57
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.veryinflated.32k_fs_LR.surf.gii
58
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.L.white.32k_fs_LR.surf.gii
59
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.inflated.32k_fs_LR.surf.gii
60
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.midthickness.32k_fs_LR.surf.gii
61
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.pial.32k_fs_LR.surf.gii
62
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.veryinflated.32k_fs_LR.surf.gii
63
+ src/plotfig/data/neurodata/surfaces/macaque_BNA/civm.R.white.32k_fs_LR.surf.gii
64
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.gray_surface.inf_300.surf.gii
65
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.gray_surface.surf.gii
66
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.mid_surface.inf_300.surf.gii
67
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.mid_surface.surf.gii
68
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.white_surface.inf_300.surf.gii
69
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/L.white_surface.surf.gii
70
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.gray_surface.inf_300.surf.gii
71
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.gray_surface.surf.gii
72
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.mid_surface.inf_300.surf.gii
73
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.mid_surface.surf.gii
74
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.white_surface.inf_300.surf.gii
75
+ src/plotfig/data/neurodata/surfaces/macaque_NMT2/R.white_surface.surf.gii
76
+ src/plotfig/data/neurodata/volumes/macaque_NMT2/CHARM5_add_13_sgms_asym.nii.gz
@@ -1,7 +1,8 @@
1
1
  [project]
2
2
  name = "plotfig"
3
- version = "0.0.6"
3
+ version = "0.0.7"
4
4
  description = "Scientific plotting package for Cognitive neuroscience"
5
+ keywords = ["neuroscience", "plotting", "visualization"]
5
6
  readme = "README.md"
6
7
  requires-python = ">=3.11"
7
8
  authors = [
@@ -19,16 +20,27 @@ dependencies = [
19
20
  "surfplot>=0.2.0",
20
21
  ]
21
22
 
23
+ [dependency-groups]
24
+ dev = [
25
+ "joblib>=1.4.2",
26
+ ]
27
+
22
28
  [build-system]
23
- requires = ["setuptools"]
29
+ requires = ["setuptools>=42", "wheel"]
24
30
  build-backend = "setuptools.build_meta"
25
31
 
26
- [tool.setuptools.packages.find]
27
- where = ["."]
28
- include = ["plotfig*"] # 包含主包及其子包
32
+ [tool.setuptools]
33
+ package-dir = {"plotfig" = "src/plotfig"}
34
+ packages = ["plotfig"]
35
+ include-package-data = true
29
36
 
30
37
  [tool.setuptools.package-data]
31
38
  plotfig = [
32
39
  "data/atlas_tables/**/*",
33
40
  "data/neurodata/**/*"
34
41
  ]
42
+
43
+ [tool.ruff]
44
+ exclude = [
45
+ "examples/example.ipynb"
46
+ ]
@@ -0,0 +1,32 @@
1
+ from .common_plot import (
2
+ plot_one_group_bar_figure,
3
+ plot_one_group_violin_figure,
4
+ plot_correlation_figure,
5
+ plot_matrix_figure,
6
+ )
7
+ from .brain_surface_plot import (
8
+ plot_human_brain_figure,
9
+ plot_human_hemi_brain_figure,
10
+ plot_macaque_brain_figure,
11
+ plot_macaque_hemi_brain_figure,
12
+ plot_chimpanzee_brain_figure,
13
+ plot_chimpanzee_hemi_brain_figure,
14
+ )
15
+ from .circos_plot import plot_symmetric_circle_figure, plot_asymmetric_circle_figure
16
+ from .brain_connection_plot import plot_brain_connection_figure
17
+
18
+ __all__ = [
19
+ "plot_one_group_bar_figure",
20
+ "plot_one_group_violin_figure",
21
+ "plot_correlation_figure",
22
+ "plot_matrix_figure",
23
+ "plot_human_brain_figure",
24
+ "plot_human_hemi_brain_figure",
25
+ "plot_macaque_brain_figure",
26
+ "plot_macaque_hemi_brain_figure",
27
+ "plot_chimpanzee_brain_figure",
28
+ "plot_chimpanzee_hemi_brain_figure",
29
+ "plot_symmetric_circle_figure",
30
+ "plot_asymmetric_circle_figure",
31
+ "plot_brain_connection_figure",
32
+ ]
@@ -8,36 +8,41 @@ import plotly.graph_objects as go
8
8
  import matplotlib.colors as mcolors
9
9
  import matplotlib.cm as cm
10
10
 
11
+ from typing import List
12
+ from pathlib import Path
13
+ import numpy.typing as npt
14
+
11
15
 
12
16
  def plot_brain_connection_figure(
13
- connectome: np.ndarray,
14
- lh_surfgii_file: str = None,
15
- rh_surfgii_file: str = None,
16
- niigz_file: str = None,
17
- nodes_name: iter = None,
18
- nodes_color: iter = None,
19
- output_file: str = None,
17
+ connectome: npt.NDArray,
18
+ lh_surfgii_file: str | Path | None = None,
19
+ rh_surfgii_file: str | Path | None = None,
20
+ niigz_file: str | Path | None = None,
21
+ nodes_name: List[str] | None = None,
22
+ nodes_size: float = 5,
23
+ nodes_color: List[str] | None = None,
24
+ output_file: str | Path | None = None,
20
25
  scale_metheod: str = "",
21
- line_width: int | float = 10,
22
- ):
26
+ line_width: float = 10,
27
+ ) -> None:
23
28
  """绘制大脑连接图,保存在指定的html文件中
24
-
25
- 如果不指定surface文件和图集nii文件,默认绘制NMT2空间上猕猴大脑连接图,图集包括个101脑区/半脑(88个皮层上 + 13个皮层下)
26
29
 
27
30
  Args:
28
- connectome (np.ndarray): 连接矩阵.
29
- lh_surfgii_file (str, optional): 左脑surf.gii文件. Defaults to None.
30
- rh_surfgii_file (str, optional): 右脑surf.gii文件. Defaults to None.
31
- niigz_file (str, optional): 图集nii文件. Defaults to None.
32
- nodes_name (iter, optional): 节点名称. Defaults to None.
33
- nodes_color (iter, optional): 节点颜色. Defaults to None.
34
- output_file (str, optional): 保存的完整路径及文件名. Defaults to None.
35
- scale_metheod (str, optional): 边scale方式. Defaults to "". 包括"width, color, width_color, color_width"
36
- line_width (int | float, optional): 边粗细. Defaults to 10.
31
+ connectome (npt.NDArray): 连接矩阵
32
+ lh_surfgii_file (str | Path | None, optional): 左脑surf.gii文件. Defaults to None.
33
+ rh_surfgii_file (str | Path | None, optional): 右脑surf.gii文件. Defaults to None.
34
+ niigz_file (str | Path | None, optional): 图集nii文件. Defaults to None.
35
+ nodes_name (List[str] | None, optional): 节点名称. Defaults to None.
36
+ nodes_size (float, optional): 节点大小. Defaults to 5.
37
+ nodes_color (List[str] | None, optional): 节点颜色. Defaults to None.
38
+ output_file (str | Path | None, optional): 保存的完整路径及文件名. Defaults to None.
39
+ scale_metheod (str, optional): 连接scale的形式. Defaults to "".
40
+ line_width (float, optional): 连接粗细. Defaults to 10.
37
41
 
38
42
  Raises:
39
43
  ValueError: 参数值错误
40
44
  """
45
+
41
46
  nodes_num = connectome.shape[0]
42
47
  # 默认参数
43
48
  current_dir = op.dirname(__file__)
@@ -85,7 +90,7 @@ def plot_brain_connection_figure(
85
90
  color="white",
86
91
  opacity=0.1,
87
92
  flatshading=True,
88
- lighting=dict(ambient=0.7, diffuse=0.3),
93
+ lighting={"ambient": 0.7, "diffuse": 0.3},
89
94
  name="Left Hemisphere",
90
95
  )
91
96
  # 右半球
@@ -99,7 +104,7 @@ def plot_brain_connection_figure(
99
104
  color="white",
100
105
  opacity=0.1,
101
106
  flatshading=True,
102
- lighting=dict(ambient=0.7, diffuse=0.3),
107
+ lighting={"ambient": 0.7, "diffuse": 0.3},
103
108
  name="Right Hemisphere",
104
109
  )
105
110
  fig = go.Figure(data=[mesh_L, mesh_R]) # 同时添加两个Mesh
@@ -132,13 +137,13 @@ def plot_brain_connection_figure(
132
137
  y=centroids_real[:, 1],
133
138
  z=centroids_real[:, 2],
134
139
  mode="markers+text",
135
- marker=dict(
136
- size=8, # 球体大小
137
- color=nodes_color, # 根据ROI标签分配颜色
138
- colorscale="Rainbow", # 颜色映射方案
139
- opacity=0.8,
140
- line=dict(width=2, color="black"), # 球体边框
141
- ),
140
+ marker={
141
+ "size": nodes_size, # 球体大小
142
+ "color": nodes_color, # 根据ROI标签分配颜色
143
+ "colorscale": "Rainbow", # 颜色映射方案
144
+ "opacity": 0.8,
145
+ "line": {"width": 2, "color": "black"}, # 球体边框
146
+ },
142
147
  text=[f"{name}" for name in nodes_name], # 悬停显示标签
143
148
  hoverinfo="text+x+y+z",
144
149
  showlegend=False, # 显示在图例中
@@ -210,9 +215,10 @@ def plot_brain_connection_figure(
210
215
  y=connection_line[:, 1],
211
216
  z=connection_line[:, 2],
212
217
  mode="lines",
213
- line=dict(
214
- color=each_line_color, width=each_line_width # 动态设置线宽
215
- ),
218
+ line={
219
+ "color": each_line_color,
220
+ "width": each_line_width, # 动态设置线宽
221
+ },
216
222
  hoverinfo="none",
217
223
  name=f"{nodes_name[i]}-{nodes_name[j]}",
218
224
  )
@@ -220,23 +226,23 @@ def plot_brain_connection_figure(
220
226
 
221
227
  # 原质心球体代码保持不变(建议调整颜色增强对比度)
222
228
  fig.update_traces(
223
- selector=dict(mode="markers"), # 仅更新质心球体
224
- marker=dict(
225
- size=10, # 增大球体尺寸
226
- colorscale="Viridis", # 改用高对比度色阶
227
- line=dict(width=3, color="black"),
228
- ),
229
+ selector={"mode": "markers"}, # 仅更新质心球体
230
+ marker={
231
+ "size": 10, # 增大球体尺寸
232
+ "colorscale": "Viridis", # 改用高对比度色阶
233
+ "line": {"width": 3, "color": "black"},
234
+ },
229
235
  )
230
236
  # 设置布局
231
237
  fig.update_layout(
232
238
  title="Connection",
233
- scene=dict(
234
- xaxis=dict(showbackground=False, visible=False),
235
- yaxis=dict(showbackground=False, visible=False),
236
- zaxis=dict(showbackground=False, visible=False),
237
- aspectmode="data", # 保持坐标轴比例一致
238
- ),
239
- margin=dict(l=0, r=0, b=0, t=30),
239
+ scene={
240
+ "xaxis": {"showbackground": False, "visible": False},
241
+ "yaxis": {"showbackground": False, "visible": False},
242
+ "zaxis": {"showbackground": False, "visible": False},
243
+ "aspectmode": "data", # 保持坐标轴比例一致
244
+ },
245
+ margin={"l": 0, "r": 0, "b": 0, "t": 30},
240
246
  )
241
247
  # 显示或保存为HTML
242
248
  fig.write_html(output_file) # 导出为交互式网页
@@ -250,7 +256,7 @@ def main():
250
256
  rh_surfgii_file = r"D:\Desktop\BG.R.midthickness.32k_fs_LR.surf.gii"
251
257
  niigz_file = r"D:\Desktop\macaque_Interoceptive_processing_network.nii.gz"
252
258
  output_file = "d:/desktop/rm_rjx.html"
253
- plot_macaque_brain_connection_figure(
259
+ plot_brain_connection_figure(
254
260
  connectome,
255
261
  lh_surfgii_file=lh_surfgii_file,
256
262
  rh_surfgii_file=rh_surfgii_file,