iplotx 0.12.0__tar.gz → 1.0.0__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 (262) hide show
  1. {iplotx-0.12.0 → iplotx-1.0.0}/PKG-INFO +1 -1
  2. iplotx-1.0.0/docs/source/_static/custom.css +5 -0
  3. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/api/artists.md +14 -2
  4. iplotx-1.0.0/docs/source/api/plotting.md +18 -0
  5. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/conf.py +11 -1
  6. iplotx-1.0.0/docs/source/index.md +39 -0
  7. iplotx-0.12.0/docs/source/index.md → iplotx-1.0.0/docs/source/installing.md +1 -21
  8. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/sg_execution_times.rst +6 -3
  9. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/style.md +63 -64
  10. iplotx-1.0.0/gallery/GALLERY_HEADER.rst +2 -0
  11. iplotx-1.0.0/gallery/basic/GALLERY_HEADER.rst +2 -0
  12. iplotx-1.0.0/gallery/biology/GALLERY_HEADER.rst +2 -0
  13. iplotx-1.0.0/gallery/network_science/GALLERY_HEADER.rst +2 -0
  14. iplotx-1.0.0/gallery/other/GALLERY_HEADER.rst +2 -0
  15. iplotx-1.0.0/gallery/style/GALLERY_HEADER.rst +2 -0
  16. iplotx-1.0.0/gallery/tree/GALLERY_HEADER.rst +2 -0
  17. iplotx-1.0.0/gallery/tree/plot_scalebar.py +19 -0
  18. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_split_edges.py +1 -1
  19. iplotx-1.0.0/gallery/zero_dependency/GALLERY_HEADER.rst +2 -0
  20. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/artists.py +4 -2
  21. iplotx-0.12.0/iplotx/network.py → iplotx-1.0.0/iplotx/network/__init__.py +8 -8
  22. {iplotx-0.12.0/iplotx → iplotx-1.0.0/iplotx/network}/groups.py +6 -6
  23. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/plotting.py +2 -2
  24. iplotx-0.12.0/iplotx/tree.py → iplotx-1.0.0/iplotx/tree/__init__.py +45 -8
  25. {iplotx-0.12.0/iplotx → iplotx-1.0.0/iplotx/tree}/cascades.py +4 -5
  26. iplotx-1.0.0/iplotx/tree/scalebar.py +326 -0
  27. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/version.py +1 -1
  28. iplotx-0.12.0/docs/source/api/plotting.md +0 -13
  29. iplotx-0.12.0/gallery/GALLERY_HEADER.rst +0 -3
  30. iplotx-0.12.0/gallery/basic/GALLERY_HEADER.rst +0 -3
  31. iplotx-0.12.0/gallery/biology/GALLERY_HEADER.rst +0 -5
  32. iplotx-0.12.0/gallery/network_science/GALLERY_HEADER.rst +0 -3
  33. iplotx-0.12.0/gallery/other/GALLERY_HEADER.rst +0 -4
  34. iplotx-0.12.0/gallery/style/GALLERY_HEADER.rst +0 -3
  35. iplotx-0.12.0/gallery/tree/GALLERY_HEADER.rst +0 -6
  36. iplotx-0.12.0/gallery/zero_dependency/GALLERY_HEADER.rst +0 -4
  37. {iplotx-0.12.0 → iplotx-1.0.0}/.github/workflows/publish.yml +0 -0
  38. {iplotx-0.12.0 → iplotx-1.0.0}/.github/workflows/test.yml +0 -0
  39. {iplotx-0.12.0 → iplotx-1.0.0}/.gitignore +0 -0
  40. {iplotx-0.12.0 → iplotx-1.0.0}/.pre-commit-config.yaml +0 -0
  41. {iplotx-0.12.0 → iplotx-1.0.0}/.readthedocs.yaml +0 -0
  42. {iplotx-0.12.0 → iplotx-1.0.0}/LICENSE +0 -0
  43. {iplotx-0.12.0 → iplotx-1.0.0}/MANIFEST.in +0 -0
  44. {iplotx-0.12.0 → iplotx-1.0.0}/README.md +0 -0
  45. {iplotx-0.12.0 → iplotx-1.0.0}/assets/pylint.svg +0 -0
  46. {iplotx-0.12.0 → iplotx-1.0.0}/docs/Makefile +0 -0
  47. {iplotx-0.12.0 → iplotx-1.0.0}/docs/make.bat +0 -0
  48. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/_static/banner.png +0 -0
  49. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/_static/custom-icons.js +0 -0
  50. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/_static/graph_basic.png +0 -0
  51. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/_templates/layout.html +0 -0
  52. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/api/complete_style_specification.md +0 -0
  53. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/api/providers.md +0 -0
  54. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/api/style.md +0 -0
  55. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/api.md +0 -0
  56. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/images/sphx_glr_plot_basic_001.png +0 -0
  57. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/images/thumb/sphx_glr_plot_basic_thumb.png +0 -0
  58. {iplotx-0.12.0 → iplotx-1.0.0}/docs/source/providers.md +0 -0
  59. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_3d.py +0 -0
  60. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_basic.py +0 -0
  61. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_big_curves.py +0 -0
  62. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_dag.py +0 -0
  63. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_directed.py +0 -0
  64. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_grouping.py +0 -0
  65. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_house.py +0 -0
  66. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_loops.py +0 -0
  67. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/basic/plot_simple_path.py +0 -0
  68. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/80201010000000001.mst +0 -0
  69. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/GN-tree.json +0 -0
  70. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/breast_cancer_string_interactions_short.tsv +0 -0
  71. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/breast_cancer_string_network_coordinates.tsv +0 -0
  72. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/cell_cycle_arrest_string_interactions_short.tsv +0 -0
  73. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/cell_cycle_arrest_string_network_coordinates.tsv +0 -0
  74. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/data/fevo-08-588430_DataSheet1_S1.csv +0 -0
  75. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_animal_phylogeny.py +0 -0
  76. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_antibody_clone.py +0 -0
  77. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_breast_cancer_ppi.py +0 -0
  78. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_cell_cycle_arrest.py +0 -0
  79. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_food_network.py +0 -0
  80. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_foraging_table.py +0 -0
  81. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_pollinators.py +0 -0
  82. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_ppi.py +0 -0
  83. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/biology/plot_tca_cycle.py +0 -0
  84. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/data/chess_masters_WCC.pgn.bz2 +0 -0
  85. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/data/knuth_miles.txt.gz +0 -0
  86. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_arrowlawn.py +0 -0
  87. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_chess_masters.py +0 -0
  88. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_cliques.py +0 -0
  89. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_cluster_layout.py +0 -0
  90. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_company_structure.py +0 -0
  91. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_complex.py +0 -0
  92. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_financial_network.py +0 -0
  93. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_knuth_miles.py +0 -0
  94. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_labels_and_colors.py +0 -0
  95. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_max_bipartite_matching.py +0 -0
  96. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_minimum_spanning_trees.py +0 -0
  97. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_multipartite_layout.py +0 -0
  98. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_parallel_igraph_networkx.py +0 -0
  99. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_redblack.py +0 -0
  100. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_shortest_path.py +0 -0
  101. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_simple_networkx.py +0 -0
  102. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_social_network_circles.py +0 -0
  103. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_traveling_salesman.py +0 -0
  104. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/network_science/plot_with_colorbar.py +0 -0
  105. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_animation.py +0 -0
  106. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_edit_artists.py +0 -0
  107. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_feedbacks.py +0 -0
  108. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_graph.py +0 -0
  109. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_mouse_hover.py +0 -0
  110. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/other/plot_train.py +0 -0
  111. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_arrows.py +0 -0
  112. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_depthshade.py +0 -0
  113. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_edgepadding.py +0 -0
  114. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_elements.py +0 -0
  115. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_four_grids.py +0 -0
  116. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_halfarrows.py +0 -0
  117. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_multistyle.py +0 -0
  118. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_ports.py +0 -0
  119. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_style.py +0 -0
  120. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_tension.py +0 -0
  121. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_vertexmarkers.py +0 -0
  122. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_voronoi.py +0 -0
  123. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/style/plot_waypoints.py +0 -0
  124. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/data/tree-with-support.json +0 -0
  125. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_angular_waypoints.py +0 -0
  126. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_biopython_tree.py +0 -0
  127. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_cladeedges.py +0 -0
  128. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_cogent3_layouts.py +0 -0
  129. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_cogent3_tree.py +0 -0
  130. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_dendropy.py +0 -0
  131. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_elements_tree.py +0 -0
  132. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_ete4.py +0 -0
  133. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_leafedges.py +0 -0
  134. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_leafedges_and_cascades.py +0 -0
  135. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_skbio_tree.py +0 -0
  136. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_style_tree.py +0 -0
  137. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_support.py +0 -0
  138. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_tree_node_background.py +0 -0
  139. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_tree_style_clades.py +0 -0
  140. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/tree/plot_trees_of_trees.py +0 -0
  141. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/zero_dependency/plot_simplenetworkdataprovider.py +0 -0
  142. {iplotx-0.12.0 → iplotx-1.0.0}/gallery/zero_dependency/plot_simpletreedataprovider.py +0 -0
  143. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/__init__.py +0 -0
  144. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/art3d/edge/__init__.py +0 -0
  145. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/art3d/edge/arrow.py +0 -0
  146. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/art3d/edge/geometry.py +0 -0
  147. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/art3d/vertex.py +0 -0
  148. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/edge/__init__.py +0 -0
  149. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/edge/arrow.py +0 -0
  150. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/edge/geometry.py +0 -0
  151. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/edge/leaf.py +0 -0
  152. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/edge/ports.py +0 -0
  153. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/__init__.py +0 -0
  154. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/heuristics.py +0 -0
  155. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/network/igraph.py +0 -0
  156. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/network/networkx.py +0 -0
  157. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/network/simple.py +0 -0
  158. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/biopython.py +0 -0
  159. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/cogent3.py +0 -0
  160. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/dendropy.py +0 -0
  161. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/ete4.py +0 -0
  162. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/simple.py +0 -0
  163. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/providers/tree/skbio.py +0 -0
  164. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/ingest/typing.py +0 -0
  165. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/label.py +0 -0
  166. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/layout.py +0 -0
  167. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/style/__init__.py +0 -0
  168. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/style/leaf_info.py +0 -0
  169. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/style/library.py +0 -0
  170. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/typing.py +0 -0
  171. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/utils/geometry.py +0 -0
  172. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/utils/internal.py +0 -0
  173. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/utils/matplotlib.py +0 -0
  174. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/utils/style.py +0 -0
  175. {iplotx-0.12.0 → iplotx-1.0.0}/iplotx/vertex.py +0 -0
  176. {iplotx-0.12.0 → iplotx-1.0.0}/pyproject.toml +0 -0
  177. {iplotx-0.12.0 → iplotx-1.0.0}/scripts/copy_github_release_into_version.sh +0 -0
  178. {iplotx-0.12.0 → iplotx-1.0.0}/scripts/make_banner.py +0 -0
  179. {iplotx-0.12.0 → iplotx-1.0.0}/scripts/update_pylint_badge.sh +0 -0
  180. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/cascades.png +0 -0
  181. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/directed_child.png +0 -0
  182. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/leaf_labels.png +0 -0
  183. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/leaf_labels_hmargin.png +0 -0
  184. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/leafedges.png +0 -0
  185. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/show_support.png +0 -0
  186. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/tree_basic.png +0 -0
  187. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_biopython/tree_radial.png +0 -0
  188. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_cogent3/leaf_labels.png +0 -0
  189. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_cogent3/leaf_labels_hmargin.png +0 -0
  190. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_cogent3/tree_basic.png +0 -0
  191. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_cogent3/tree_radial.png +0 -0
  192. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/cascades.png +0 -0
  193. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/directed_child.png +0 -0
  194. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/leaf_labels.png +0 -0
  195. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/leaf_labels_hmargin.png +0 -0
  196. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/leafedges.png +0 -0
  197. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/tree_basic.png +0 -0
  198. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_dendropy/tree_radial.png +0 -0
  199. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_ete4/leaf_labels.png +0 -0
  200. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_ete4/leaf_labels_hmargin.png +0 -0
  201. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_ete4/split_edges.png +0 -0
  202. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_ete4/tree_basic.png +0 -0
  203. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_ete4/tree_radial.png +0 -0
  204. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/clustering_directed.png +0 -0
  205. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/clustering_directed_large.png +0 -0
  206. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_basic.png +0 -0
  207. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_directed.png +0 -0
  208. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_directed_curved_loops.png +0 -0
  209. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_edit_children.png +0 -0
  210. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_labels.png +0 -0
  211. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_layout_attribute.png +0 -0
  212. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_null.png +0 -0
  213. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_squares_directed.png +0 -0
  214. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_vertexsize.png +0 -0
  215. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/graph_with_curved_edges.png +0 -0
  216. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/igraph_layout_object.png +0 -0
  217. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph/multigraph_with_curved_edges_undirected.png +0 -0
  218. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph_3d/directed.png +0 -0
  219. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph_3d/undirected.png +0 -0
  220. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_igraph_3d/vertex_labels.png +0 -0
  221. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/cluster-layout.png +0 -0
  222. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/complex.png +0 -0
  223. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/complex_rotatelabels.png +0 -0
  224. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/directed_graph.png +0 -0
  225. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/directed_graph_with_colorbar.png +0 -0
  226. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/empty_graph.png +0 -0
  227. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/flat_style.png +0 -0
  228. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/house_with_colors.png +0 -0
  229. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/labels_and_colors.png +0 -0
  230. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/shortest_path.png +0 -0
  231. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_networkx/simple_graph.png +0 -0
  232. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_simple_network_provider/graph_basic.png +0 -0
  233. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_simple_network_provider/graph_directed.png +0 -0
  234. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_simple_network_provider/graph_labels.png +0 -0
  235. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_skbio/leaf_labels.png +0 -0
  236. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_skbio/leaf_labels_hmargin.png +0 -0
  237. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_skbio/tree_basic.png +0 -0
  238. {iplotx-0.12.0 → iplotx-1.0.0}/tests/baseline_images/test_skbio/tree_radial.png +0 -0
  239. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_arrows.py +0 -0
  240. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_biopython.py +0 -0
  241. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_cascades.py +0 -0
  242. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_cogent3.py +0 -0
  243. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_dendropy.py +0 -0
  244. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_edge.py +0 -0
  245. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_edge_geometry.py +0 -0
  246. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_ete4.py +0 -0
  247. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_geometry.py +0 -0
  248. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_heuristics.py +0 -0
  249. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_igraph.py +0 -0
  250. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_igraph_3d.py +0 -0
  251. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_ingest_protocols.py +0 -0
  252. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_matplotlib_utils.py +0 -0
  253. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_network_hotload.py +0 -0
  254. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_networkx.py +0 -0
  255. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_ports.py +0 -0
  256. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_simple_network_provider.py +0 -0
  257. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_simple_tree_provider.py +0 -0
  258. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_skbio.py +0 -0
  259. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_style.py +0 -0
  260. {iplotx-0.12.0 → iplotx-1.0.0}/tests/test_vertex.py +0 -0
  261. {iplotx-0.12.0 → iplotx-1.0.0}/tests/utils.py +0 -0
  262. {iplotx-0.12.0 → iplotx-1.0.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iplotx
3
- Version: 0.12.0
3
+ Version: 1.0.0
4
4
  Summary: Plot networkx from igraph and networkx.
5
5
  Project-URL: Homepage, https://github.com/fabilab/iplotx
6
6
  Project-URL: Documentation, https://readthedocs.org/iplotx
@@ -0,0 +1,5 @@
1
+ /* Use full page width without sidebars */
2
+ .bd-content {
3
+ max-width: 100%;
4
+ flex-grow: 1;
5
+ }
@@ -1,5 +1,5 @@
1
1
  # Artist hierarchy
2
- `iplotx.plot` return a list of `matplotlib` artists (1 or 2). When a network is plotted, the first artist is an instance of `iplotx.NetworkArtist`. This class contains the visual elements representing vertices, edges, labels, arrows, etc. and can be used to further edit the plot after `iplotx.plot` returned.
2
+ `iplotx.network` return a list of `matplotlib` artists (1 or 2). When a network is plotted, the first artist is an instance of `iplotx.NetworkArtist`. This class contains the visual elements representing vertices, edges, labels, arrows, etc. and can be used to further edit the plot after `iplotx.plot` returned.
3
3
 
4
4
  A `NetworkArtist` instance has two notable properties: vertices and edges, which are instances of `VertexCollection` and `EdgeCollection`, respectively. These collections are `matplotlib` artists that can be used to modify the appearance of vertices and edges after the plot has been created.
5
5
 
@@ -9,7 +9,6 @@ In turn, a `VertexCollection` or `EdgeCollection` instance **may** contain a `La
9
9
  .. autoclass:: iplotx.network.NetworkArtist
10
10
  :members:
11
11
 
12
-
13
12
  .. autoclass:: iplotx.vertex.VertexCollection
14
13
  :members:
15
14
 
@@ -22,3 +21,16 @@ In turn, a `VertexCollection` or `EdgeCollection` instance **may** contain a `La
22
21
  .. autoclass:: iplotx.edge.arrow.EdgeArrowCollection
23
22
  :members:
24
23
  ```
24
+
25
+
26
+ ## 3D artists
27
+ The {py:class}`iplotx.network.NetworkArtist` class is also used for 3D plots. In that case, the `VertexCollection` and `EdgeCollection` instances are substituted by the following:
28
+
29
+ ```{eval-rst}
30
+ .. autoclass:: iplotx.art3d.vertex.Vertex3DCollection
31
+ :members:
32
+
33
+ .. autoclass:: iplotx.art3d.edge.Edge3DCollection
34
+ :members:
35
+
36
+ ```
@@ -0,0 +1,18 @@
1
+ # Plotting API
2
+ The main user-facing functions are:
3
+
4
+ - `iplotx.network`to visualise networks/graphs and graph groupings (covers and clusterings)
5
+ - `iplotx.tree` to visualise trees.
6
+
7
+ ```{tip}
8
+ `iplotx.plot` and `iplotx.graph` are synonyms for `iplotx.network`.
9
+ ```
10
+
11
+ ```{warning}
12
+ `iplotx.plot` is deprecated and will be removed in future versions. Please use `iplotx.network` instead.
13
+ ```
14
+
15
+ ```{eval-rst}
16
+ .. autofunction:: iplotx.network
17
+
18
+ .. autofunction:: iplotx.tree
@@ -44,7 +44,10 @@ napoleon_preprocess_types = False
44
44
  napoleon_type_aliases = None
45
45
  napoleon_attr_annotations = True
46
46
 
47
- myst_enable_extensions = ["colon_fence"]
47
+ myst_enable_extensions = [
48
+ "colon_fence",
49
+ "attrs_inline",
50
+ ]
48
51
 
49
52
  sphinx_gallery_conf = {
50
53
  "examples_dirs": "../../gallery", # path to your example scripts
@@ -69,9 +72,12 @@ exclude_patterns = []
69
72
 
70
73
  html_theme = "pydata_sphinx_theme"
71
74
  html_static_path = ["_static"]
75
+ html_css_files = ["_static/custom.css"]
72
76
  html_js_files = [
73
77
  ("custom-icons.js", {"defer": "defer"}),
74
78
  ]
79
+ html_sidebars = {"**": []}
80
+
75
81
 
76
82
  html_theme_options = {
77
83
  "header_links_before_dropdown": 4,
@@ -88,6 +94,10 @@ html_theme_options = {
88
94
  "icon": "fa-custom fa-pypi",
89
95
  },
90
96
  ],
97
+ "secondary_sidebar_items": {
98
+ "**": ["page-toc", "sourcelink"],
99
+ "index": [],
100
+ },
91
101
  }
92
102
 
93
103
  # -----------------------------------------------------------------------------
@@ -0,0 +1,39 @@
1
+ # iplotx documentation
2
+
3
+ ```{grid} 4
4
+ :gutter: 1
5
+
6
+ :::{grid-item}
7
+ [![ex1](./_images/sphx_glr_plot_edit_artists_001.png)](gallery/style/plot_ports.rst)
8
+ :::
9
+ :::{grid-item}
10
+ [![ex2](./_images/sphx_glr_plot_animation_thumb.gif)](gallery/other/plot_animation.rst)
11
+ :::
12
+ :::{grid-item}
13
+ [![ex3](./_images/sphx_glr_plot_3d_thumb.png)](gallery/basic/plot_3d.rst)
14
+ :::
15
+ :::{grid-item}
16
+ [![ex4](./_images/sphx_glr_plot_tree_node_background_thumb.png)](gallery/tree/plot_tree_node_background.rst)
17
+ :::
18
+ ```
19
+
20
+ [iplotx](https://github.com/fabilab/iplotx) is a Python library to display graphs/networks and trees with [matplotlib](https://matplotlib.org/). It natively supports [networkx](https://networkx.org/) and [igraph](https://python.igraph.org/) networks and [biopython](https://biopython.org/), [scikit-bio](https://scikit.bio/), [cogent3](https://cogent3.org/), [ETE4](https://etetoolkit.github.io/ete/), and [dendropy](https://jeetsukumaran.github.io/DendroPy/index.html) trees. It can also plot networks and trees from simple, pure Python data structures for zero-dependency visualisation.
21
+
22
+ `iplotx` guarantees the **exact same visual appearance** independently of what library you used to construct the network/tree.
23
+
24
+ ```{toctree}
25
+ :maxdepth: 1
26
+ :titlesonly:
27
+ :hidden:
28
+
29
+ installing
30
+ gallery/index
31
+ style
32
+ API <api>
33
+ Complete style specification <api/complete_style_specification>
34
+ Data providers <providers>
35
+ Plotting API <api/plotting>
36
+ Style API <api/style>
37
+ Artist hierarchy <api/artists>
38
+ Data provider protocols <api/providers>
39
+ ```
@@ -1,10 +1,4 @@
1
- # iplotx documentation
2
-
3
- [iplotx](https://github.com/fabilab/iplotx) is a Python library to display graphs/networks and trees with [matplotlib](https://matplotlib.org/). It natively supports [networkx](https://networkx.org/) and [igraph](https://python.igraph.org/) networks and [biopython](https://biopython.org/), [scikit-bio](https://scikit.bio/), [cogent3](https://cogent3.org/), [ETE4](https://etetoolkit.github.io/ete/), and [dendropy](https://jeetsukumaran.github.io/DendroPy/index.html) trees.
4
-
5
- `iplotx` guarantees the **exact same visual appearance** independently of what library you used to construct the network/tree.
6
-
7
- ## Installation
1
+ # Installing
8
2
  ```
9
3
  pip install iplotx
10
4
  ```
@@ -113,17 +107,3 @@ Open an [issue on GitHub](https://github.com/fabilab/iplotx/issues) to request f
113
107
  to propose improvements or see support for it, please reach out with an issue/PR
114
108
  on GitHub!
115
109
  ```
116
-
117
- ## Sitemap
118
- ```{toctree}
119
- :maxdepth: 2
120
- :caption: Contents
121
-
122
- gallery/index
123
- style
124
- API <api>
125
- Complete style specification <api/complete_style_specification>
126
- Data providers <providers>
127
- Artist hierarchy <api/artists>
128
- Data provider protocols <api/providers>
129
- ```
@@ -6,7 +6,7 @@
6
6
 
7
7
  Computation times
8
8
  =================
9
- **00:00.525** total execution time for 75 files **from all galleries**:
9
+ **00:00.497** total execution time for 76 files **from all galleries**:
10
10
 
11
11
  .. container::
12
12
 
@@ -32,8 +32,8 @@ Computation times
32
32
  * - Example
33
33
  - Time
34
34
  - Mem (MB)
35
- * - :ref:`sphx_glr_gallery_tree_plot_dendropy.py` (``../../gallery/tree/plot_dendropy.py``)
36
- - 00:00.525
35
+ * - :ref:`sphx_glr_gallery_tree_plot_scalebar.py` (``../../gallery/tree/plot_scalebar.py``)
36
+ - 00:00.497
37
37
  - 0.0
38
38
  * - :ref:`sphx_glr_gallery_basic_plot_3d.py` (``../../gallery/basic/plot_3d.py``)
39
39
  - 00:00.000
@@ -218,6 +218,9 @@ Computation times
218
218
  * - :ref:`sphx_glr_gallery_tree_plot_cogent3_tree.py` (``../../gallery/tree/plot_cogent3_tree.py``)
219
219
  - 00:00.000
220
220
  - 0.0
221
+ * - :ref:`sphx_glr_gallery_tree_plot_dendropy.py` (``../../gallery/tree/plot_dendropy.py``)
222
+ - 00:00.000
223
+ - 0.0
221
224
  * - :ref:`sphx_glr_gallery_tree_plot_elements_tree.py` (``../../gallery/tree/plot_elements_tree.py``)
222
225
  - 00:00.000
223
226
  - 0.0
@@ -1,8 +1,8 @@
1
1
  # Styles
2
- Network plots can be customised using styles.
2
+ Visualisations can be customised using styles.
3
3
 
4
4
  ## What is a style?
5
- Formally, a style is a **nested dictionary** specifying the visual properties of each graph element. The three top-level keys for a style dictionary are `vertex`, `edge`, and `grouping`. A typical style specification looks like this:
5
+ Formally, a style is a **nested dictionary** specifying the visual properties of each graph element. The main top-level keys for a style dictionary are `vertex` and `edge`. A typical style specification looks like this:
6
6
 
7
7
  ```python
8
8
  mystyle = {
@@ -19,6 +19,7 @@ mystyle = {
19
19
  }
20
20
  ```
21
21
 
22
+ Additional top-level keys exist for networks (e.g. `grouping`) and trees (e.g. `leaf`, `clade`, `internal`). The complete style specification is documented in the [API reference](api/complete_style_specification.md).
22
23
 
23
24
  `iplotx` has a default style that you can inspect as follows:
24
25
 
@@ -30,11 +31,10 @@ print(default_style)
30
31
  When a custom style is specified for a plot, it is applied **on top of** the current style, which is usually the default style.
31
32
 
32
33
  ```{warning}
33
- Multiple styling at once might be necessary. For example, the default style has white labels onto black vertex faces. If you want to have white vertices,
34
- you should also at the same time specify another color (e.g. black) for the labels, otherwise labels will be drawn white on white and therefore invisible.
34
+ The default style has black vertices with white vertex labels. If you change the vertex face color, you might want to change the vertex label color as well to ensure readability.
35
35
  ```
36
36
 
37
- `iplotx` also has a dictionary of predefined styles to serve as basis in different contexts. You can access these styles as follows:
37
+ `iplotx` also has an internal [library of styles](gallery/style/plot_multistyle.rst) to serve as basis in different contexts. You can access these styles as follows:
38
38
 
39
39
  ```python
40
40
  from iplotx.style import styles
@@ -44,14 +44,14 @@ print(styles)
44
44
  For example, the `hollow` style uses vertices with no face color, black edges, black vertex labels, square vertices, and autosizes vertices to fit their text labels. This style is designed to be useful when label boxes are important to visualise the graph (e.g. company tree structures, or block-type diagrams).
45
45
 
46
46
  ## Applying styles
47
- There are a few different ways to use a style in `iplotx` (the mechanism is similar to styles in `matplotlib`).
47
+ There are a few different ways to use a style in `iplotx` (the mechanism is similar to styles in `Matplotlib`).
48
48
 
49
- ### Function argument
50
- To apply a style to a single plot, you can pass it to the `iplotx.plot` function as a keyword argument:
49
+ ### Single function calls
50
+ To apply a style to a single plot, you can pass it to the {func}`.network` and {func}`.tree` functions as a keyword argument:
51
51
 
52
52
  ```python
53
53
  import iplotx as ipx
54
- ipx.plot(
54
+ ipx.network(
55
55
  ...,
56
56
  style={
57
57
  "vertex": {'size': 20},
@@ -59,52 +59,29 @@ ipx.plot(
59
59
  )
60
60
  ```
61
61
 
62
- In addition to the method above, the `iplotx.plot` function accepts an additional syntax for styles, which is similar to how plotting styles work in `networkx` and `igraph`. You can specify each style change as a keyword argument, with underscores `_` used to mean a subdictionary. For instance, you can specify to have vertices with a red face and size 30 as follows:
62
+ These functions also accept individual element styling via keyword arguments, with underscores `_` meant for splitting levels. For instance, you can specify to have vertices with a red face and size 30 as follows:
63
63
 
64
64
  ```python
65
- ipx.plot(
65
+ ipx.network(
66
66
  ...,
67
67
  vertex_facecolor="red",
68
68
  vertex_size=30,
69
69
  )
70
70
  ```
71
71
 
72
- If both `style` and these custom arguments are used in the function, styles are applied first and these additional arguments are applied at the end.
73
-
74
- ````{important}
75
- This last syntax is designed to make short but deep style specifications easier. For instance, to change the background of edge labels to green, you can do:
76
-
77
- ```python
78
- ipx.plot(
79
- ...,
80
- edge_label_bbox_facecolor="grey",
81
- )
82
- ```
83
-
84
- which is more readable than the equivalent style dictionary:
85
- ```python
86
- ipx.plot(
87
- ...,
88
- style={'edge': {'label': {'bbox': {'facecolor': "grey"}}}},
89
- )
90
- ```
91
- However, they can become confusing if many details of the same element are styled at once. Do not do the following:
92
- ```python
93
- iplotx.plot(
94
- ...,
95
- vertex_size=20,
96
- vertex_facecolor="red",
97
- vertex_edgecolor="grey",
98
- vertex_linewidth=2,
99
- vertex_marker="d",
100
- vertex_label_color="black",
101
- )
102
- ```
103
- It is correct syntax, but obviously not very readable; use a dictionary instead.
104
- ````
105
-
106
- ### Style context
107
- If you want a style to be applied beyond a single function call, you can use a style context:
72
+ If both `style` and these custom arguments are used in the function, styles are applied first and individual keyword arguments are applied at the end, e.g.:
73
+
74
+ ```python
75
+ ipx.network(
76
+ ...,
77
+ style="unicorn",
78
+ vertex_facecolor="red",
79
+ vertex_size=30,
80
+ )
81
+ ```
82
+
83
+ ### Style contexts
84
+ If you want a style to be applied beyond a single function call, you can use a {func}`.style.context`:
108
85
 
109
86
  ```python
110
87
  import iplotx as ipx
@@ -114,17 +91,17 @@ with iplotx.style.context(
114
91
  }
115
92
  ):
116
93
  # First plot uses this style
117
- ipx.plot(...)
94
+ ipx.network(...)
118
95
  # Second plot ALSO uses the same style
119
- ipx.plot(...)
96
+ ipx.network(...)
120
97
  ```
121
98
 
122
99
  ```{note}
123
100
  You can also pass the same `style` argument to all functions instead. Both achieve the same effect in practice, though the context is slightly more Pythonic.
124
101
  ```
125
102
 
126
- ### Permanent style
127
- To apply a style permanently (in this Python session), you can use the `iplotx.style.use` function:
103
+ ### Permanent styles
104
+ To apply a style permanently (in this Python session), you can use the {func}`.style.use` function:
128
105
 
129
106
  ```python
130
107
  import iplotx as ipx
@@ -142,32 +119,34 @@ To specify a predefined style, you can just use its name as a string:
142
119
  ipx.style.use("hollow")
143
120
  ```
144
121
 
145
- ### Chaining styles
146
- All style specifications can include one style (as shown in the examples above) or a list of styles, which will be applied in order on top of the current style (usually default). For instance, to use a hollow style customised to have red edges, you can do:
122
+ ## Reverting to default style
123
+ To reset `iplotx`'s style to the default one, you can use the {func}`.style.reset` function:
124
+
125
+ ```python
126
+ ipx.style.reset()
127
+ ```
128
+
129
+ ## Chaining styles
130
+ All three style specifications methods accept both a single style or a list of styles. Multiple styles, if present, are applied in order on top of the current style (usually default). For instance, to use a hollow style customised to have red edges, you can do:
147
131
 
148
132
  ```python
149
133
  with iplotx.style.context([
150
134
  "hollow",
151
135
  {"edge": {"color": "red"}},
152
136
  ]):
153
- ipx.plot(...)
137
+ ipx.network(...)
154
138
  ```
155
139
 
156
140
  This will take the current style (usually default), apply the "hollow" style on top, and then apply the red edge color on top of that. The style will revert when the context exists.
157
141
 
158
142
  ```{note}
159
- The same works for the `iplotx.plot` function, where you can pass a list of styles as the `style` argument.
143
+ The same works for the {func}`.network` and {func}`.tree` functions, where you can pass a list of styles as the `style` argument.
160
144
  ```
161
145
 
162
- ### Rotating style leaves
146
+ ## Rotating style leaves
163
147
  All properties listed in the default style can be modified.
164
148
 
165
- When **leaf properties** are set as list-like objects, they are applied to the graph elements in a cyclic manner (a similar mechanism is in place in `matplotlib` and `seaborn` for color palettes). For example, if you set `facecolor` to `["red", "blue"]`, the first vertex will be red, the second blue, the third red, and so on. This is called **style leaf rotation**.
166
-
167
- To see all leaf properties, you can type:
168
- ```python
169
- print(ipx.styles.style_leaves)
170
- ```
149
+ When **leaf properties** are set as list-like objects, they are applied to the graph elements in a cyclic manner (a similar mechanism is in place in `Matplotlib` and `seaborn` for color palettes). For example, if you set `facecolor` to `["red", "blue"]`, the first vertex will be red, the second blue, the third red, and so on. This is called **style leaf rotation**.
171
150
 
172
151
  Style leaves can be rotated also using a dictionary instead of a list. In that case, vertex and/or edge IDs are used to match each element to their appearance. Here's an example:
173
152
 
@@ -176,10 +155,30 @@ import networkx as nx
176
155
  import iplotx as ipx
177
156
 
178
157
  G = nx.Graph([(0, 1)])
179
- ipx.plot(
158
+ ipx.network(
180
159
  G,
181
160
  vertex_size={0: 20, 1: 30},
182
161
  )
183
162
  ```
184
163
 
185
- This is likely to be useful when plotting objects from `networkx`, which used nested dictionaries to store graph/vertex/edge properties.
164
+ These dictionaries (or dict-like, e.g. `defaultdict`) can be partial, i.e. only specify a custom styling for some elements within a class (e.g. vertex color). The current style will be applied as fallback for elements not specified in the dictionary.
165
+
166
+ ```{note}
167
+ When using dictionaries for style leaves, make sure that the keys match the vertex/edge IDs exactly. For instance, if your graph has string vertex IDs, using integers as keys might not work.
168
+ ```
169
+
170
+
171
+ To see all leaf properties, you can type:
172
+
173
+ ```python
174
+ print(ipx.styles.style_leaves)
175
+ ```
176
+
177
+ To see properties that *cannot* be rotated, you can type:
178
+
179
+ ```python
180
+ print(ipx.styles.nonrotating_leaves)
181
+ ```
182
+
183
+
184
+ Please open a [GitHub issue](https://github.com/fabilab/iplotx/issues) if you would like a property listed in `nonrotating_leaves` to be rotated.
@@ -0,0 +1,2 @@
1
+ Gallery
2
+ =======
@@ -0,0 +1,2 @@
1
+ Basic
2
+ +++++
@@ -0,0 +1,2 @@
1
+ Biology and Ecology
2
+ +++++++++++++++++++
@@ -0,0 +1,2 @@
1
+ Network science
2
+ +++++++++++++++
@@ -0,0 +1,2 @@
1
+ Other
2
+ +++++
@@ -0,0 +1,2 @@
1
+ Style
2
+ +++++
@@ -0,0 +1,2 @@
1
+ Trees
2
+ +++++
@@ -0,0 +1,19 @@
1
+ """
2
+ Scale bar
3
+ =========
4
+
5
+ This example shows how to add a scale bar to an ``iplotx`` tree.
6
+ """
7
+
8
+ from dendropy import Tree
9
+ import iplotx as ipx
10
+
11
+ tree = Tree.get(data="((,(,((,),(,)))));", schema="newick")
12
+
13
+ tree_artist = ipx.plotting.tree(
14
+ tree,
15
+ edge_color="grey",
16
+ )
17
+ tree_artist.scalebar(
18
+ loc="upper left",
19
+ )
@@ -3,7 +3,7 @@ Split edges
3
3
  ===========
4
4
 
5
5
  This example shows how to use split edges, i.e. how to apply different styles to
6
- tree edges that are composed of multiple segments. See also :doc:`plot_simpletreedataprovider`
6
+ tree edges that are composed of multiple segments. See also :doc:`../zero_dependency/plot_simpletreedataprovider`
7
7
  for the basic example of how to plot a tree with ``iplotx``'s internal tree representation.
8
8
 
9
9
  .. note::
@@ -0,0 +1,2 @@
1
+ Zero-dependency
2
+ +++++++++++++++
@@ -3,19 +3,21 @@ All artists defined in iplotx.
3
3
  """
4
4
 
5
5
  from .network import NetworkArtist
6
- from .tree import TreeArtist
6
+ from .network.groups import GroupingCollection
7
7
  from .vertex import VertexCollection
8
8
  from .edge import EdgeCollection
9
9
  from .label import LabelCollection
10
10
  from .edge.arrow import EdgeArrowCollection
11
11
  from .edge.leaf import LeafEdgeCollection
12
- from .cascades import CascadeCollection
13
12
  from .art3d.vertex import Vertex3DCollection
14
13
  from .art3d.edge import Edge3DCollection
14
+ from .tree import TreeArtist
15
+ from .tree.cascades import CascadeCollection
15
16
 
16
17
 
17
18
  ___all__ = (
18
19
  NetworkArtist,
20
+ GroupingCollection,
19
21
  TreeArtist,
20
22
  VertexCollection,
21
23
  EdgeCollection,
@@ -7,33 +7,33 @@ import numpy as np
7
7
  import pandas as pd
8
8
  import matplotlib as mpl
9
9
 
10
- from .typing import (
10
+ from ..typing import (
11
11
  GraphType,
12
12
  LayoutType,
13
13
  )
14
- from .style import (
14
+ from ..style import (
15
15
  get_style,
16
16
  rotate_style,
17
17
  )
18
- from .utils.matplotlib import (
18
+ from ..utils.matplotlib import (
19
19
  _stale_wrapper,
20
20
  _forwarder,
21
21
  _build_cmap_fun,
22
22
  )
23
- from .ingest import (
23
+ from ..ingest import (
24
24
  ingest_network_data,
25
25
  )
26
- from .vertex import (
26
+ from ..vertex import (
27
27
  VertexCollection,
28
28
  )
29
- from .edge import (
29
+ from ..edge import (
30
30
  EdgeCollection,
31
31
  make_stub_patch as make_undirected_edge_patch,
32
32
  )
33
- from .art3d.vertex import (
33
+ from ..art3d.vertex import (
34
34
  vertex_collection_2d_to_3d,
35
35
  )
36
- from .art3d.edge import (
36
+ from ..art3d.edge import (
37
37
  Edge3DCollection,
38
38
  edge_collection_2d_to_3d,
39
39
  )
@@ -1,5 +1,5 @@
1
1
  """
2
- Module for vertex groupings code, especially the GroupingArtist class.
2
+ Module for vertex groupings code, especially the GroupingCollection class.
3
3
  """
4
4
 
5
5
  from typing import Union
@@ -9,22 +9,22 @@ import matplotlib as mpl
9
9
  from matplotlib.collections import PatchCollection
10
10
 
11
11
 
12
- from .typing import (
12
+ from ..typing import (
13
13
  GroupingType,
14
14
  LayoutType,
15
15
  )
16
- from .ingest.heuristics import (
16
+ from ..ingest.heuristics import (
17
17
  normalise_layout,
18
18
  normalise_grouping,
19
19
  )
20
- from .style import get_style, rotate_style
21
- from .utils.geometry import (
20
+ from ..style import get_style, rotate_style
21
+ from ..utils.geometry import (
22
22
  convex_hull,
23
23
  _compute_group_path_with_vertex_padding,
24
24
  )
25
25
 
26
26
 
27
- class GroupingArtist(PatchCollection):
27
+ class GroupingCollection(PatchCollection):
28
28
  """Matplotlib artist for a vertex grouping (clustering/cover).
29
29
 
30
30
  This class is used to plot patches surrounding groups of vertices in a network.
@@ -13,7 +13,7 @@ from .typing import (
13
13
  TreeType,
14
14
  )
15
15
  from .network import NetworkArtist
16
- from .groups import GroupingArtist
16
+ from .network.groups import GroupingCollection
17
17
  from .tree import TreeArtist
18
18
  from .style import context
19
19
 
@@ -101,7 +101,7 @@ def network(
101
101
  nwkart = None
102
102
 
103
103
  if grouping is not None:
104
- grpart = GroupingArtist(
104
+ grpart = GroupingCollection(
105
105
  grouping,
106
106
  layout,
107
107
  network=network,