iplotx 0.12.0__tar.gz → 1.0.1__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.
- iplotx-1.0.1/.github/workflows/test.yml +86 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/PKG-INFO +7 -6
- {iplotx-0.12.0 → iplotx-1.0.1}/README.md +6 -5
- iplotx-1.0.1/docs/source/_static/custom.css +5 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/api/artists.md +14 -2
- iplotx-1.0.1/docs/source/api/plotting.md +18 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/conf.py +11 -1
- iplotx-1.0.1/docs/source/index.md +39 -0
- iplotx-0.12.0/docs/source/index.md → iplotx-1.0.1/docs/source/installing.md +1 -21
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/sg_execution_times.rst +6 -3
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/style.md +63 -64
- iplotx-1.0.1/gallery/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/basic/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/biology/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/network_science/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/other/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/style/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/tree/GALLERY_HEADER.rst +2 -0
- iplotx-1.0.1/gallery/tree/plot_scalebar.py +19 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_split_edges.py +1 -1
- iplotx-1.0.1/gallery/zero_dependency/GALLERY_HEADER.rst +2 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/artists.py +4 -2
- iplotx-1.0.1/iplotx/ingest/providers/network/graph_tool.py +100 -0
- iplotx-0.12.0/iplotx/network.py → iplotx-1.0.1/iplotx/network/__init__.py +8 -8
- {iplotx-0.12.0/iplotx → iplotx-1.0.1/iplotx/network}/groups.py +6 -6
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/plotting.py +2 -2
- iplotx-0.12.0/iplotx/tree.py → iplotx-1.0.1/iplotx/tree/__init__.py +48 -8
- {iplotx-0.12.0/iplotx → iplotx-1.0.1/iplotx/tree}/cascades.py +4 -5
- iplotx-1.0.1/iplotx/tree/scalebar.py +327 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/version.py +1 -1
- iplotx-1.0.1/tests/baseline_images/test_graph_tool/graph_basic.png +1 -0
- iplotx-1.0.1/tests/baseline_images/test_graph_tool/graph_directed.png +1 -0
- iplotx-1.0.1/tests/test_graph_tool.py +44 -0
- iplotx-0.12.0/.github/workflows/test.yml +0 -43
- iplotx-0.12.0/docs/source/api/plotting.md +0 -13
- iplotx-0.12.0/gallery/GALLERY_HEADER.rst +0 -3
- iplotx-0.12.0/gallery/basic/GALLERY_HEADER.rst +0 -3
- iplotx-0.12.0/gallery/biology/GALLERY_HEADER.rst +0 -5
- iplotx-0.12.0/gallery/network_science/GALLERY_HEADER.rst +0 -3
- iplotx-0.12.0/gallery/other/GALLERY_HEADER.rst +0 -4
- iplotx-0.12.0/gallery/style/GALLERY_HEADER.rst +0 -3
- iplotx-0.12.0/gallery/tree/GALLERY_HEADER.rst +0 -6
- iplotx-0.12.0/gallery/zero_dependency/GALLERY_HEADER.rst +0 -4
- {iplotx-0.12.0 → iplotx-1.0.1}/.github/workflows/publish.yml +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/.gitignore +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/.pre-commit-config.yaml +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/.readthedocs.yaml +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/LICENSE +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/MANIFEST.in +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/assets/pylint.svg +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/Makefile +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/make.bat +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/_static/banner.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/_static/custom-icons.js +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/_static/graph_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/_templates/layout.html +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/api/complete_style_specification.md +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/api/providers.md +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/api/style.md +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/api.md +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/images/sphx_glr_plot_basic_001.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/images/thumb/sphx_glr_plot_basic_thumb.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/docs/source/providers.md +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_3d.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_basic.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_big_curves.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_dag.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_directed.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_grouping.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_house.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_loops.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/basic/plot_simple_path.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/80201010000000001.mst +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/GN-tree.json +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/breast_cancer_string_interactions_short.tsv +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/breast_cancer_string_network_coordinates.tsv +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/cell_cycle_arrest_string_interactions_short.tsv +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/cell_cycle_arrest_string_network_coordinates.tsv +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/data/fevo-08-588430_DataSheet1_S1.csv +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_animal_phylogeny.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_antibody_clone.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_breast_cancer_ppi.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_cell_cycle_arrest.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_food_network.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_foraging_table.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_pollinators.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_ppi.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/biology/plot_tca_cycle.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/data/chess_masters_WCC.pgn.bz2 +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/data/knuth_miles.txt.gz +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_arrowlawn.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_chess_masters.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_cliques.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_cluster_layout.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_company_structure.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_complex.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_financial_network.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_knuth_miles.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_labels_and_colors.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_max_bipartite_matching.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_minimum_spanning_trees.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_multipartite_layout.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_parallel_igraph_networkx.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_redblack.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_shortest_path.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_simple_networkx.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_social_network_circles.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_traveling_salesman.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/network_science/plot_with_colorbar.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_animation.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_edit_artists.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_feedbacks.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_graph.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_mouse_hover.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/other/plot_train.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_arrows.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_depthshade.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_edgepadding.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_elements.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_four_grids.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_halfarrows.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_multistyle.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_ports.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_style.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_tension.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_vertexmarkers.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_voronoi.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/style/plot_waypoints.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/data/tree-with-support.json +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_angular_waypoints.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_biopython_tree.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_cladeedges.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_cogent3_layouts.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_cogent3_tree.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_dendropy.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_elements_tree.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_ete4.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_leafedges.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_leafedges_and_cascades.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_skbio_tree.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_style_tree.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_support.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_tree_node_background.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_tree_style_clades.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/tree/plot_trees_of_trees.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/zero_dependency/plot_simplenetworkdataprovider.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/gallery/zero_dependency/plot_simpletreedataprovider.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/__init__.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/art3d/edge/__init__.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/art3d/edge/arrow.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/art3d/edge/geometry.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/art3d/vertex.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/edge/__init__.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/edge/arrow.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/edge/geometry.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/edge/leaf.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/edge/ports.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/__init__.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/heuristics.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/network/igraph.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/network/networkx.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/network/simple.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/biopython.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/cogent3.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/dendropy.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/ete4.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/simple.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/providers/tree/skbio.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/ingest/typing.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/label.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/layout.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/style/__init__.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/style/leaf_info.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/style/library.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/typing.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/utils/geometry.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/utils/internal.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/utils/matplotlib.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/utils/style.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/iplotx/vertex.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/pyproject.toml +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/scripts/copy_github_release_into_version.sh +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/scripts/make_banner.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/scripts/update_pylint_badge.sh +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/cascades.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/directed_child.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/leaf_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/leaf_labels_hmargin.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/leafedges.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/show_support.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/tree_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_biopython/tree_radial.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_cogent3/leaf_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_cogent3/leaf_labels_hmargin.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_cogent3/tree_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_cogent3/tree_radial.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/cascades.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/directed_child.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/leaf_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/leaf_labels_hmargin.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/leafedges.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/tree_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_dendropy/tree_radial.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_ete4/leaf_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_ete4/leaf_labels_hmargin.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_ete4/split_edges.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_ete4/tree_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_ete4/tree_radial.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/clustering_directed.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/clustering_directed_large.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_directed.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_directed_curved_loops.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_edit_children.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_layout_attribute.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_null.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_squares_directed.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_vertexsize.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/graph_with_curved_edges.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/igraph_layout_object.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph/multigraph_with_curved_edges_undirected.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph_3d/directed.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph_3d/undirected.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_igraph_3d/vertex_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/cluster-layout.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/complex.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/complex_rotatelabels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/directed_graph.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/directed_graph_with_colorbar.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/empty_graph.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/flat_style.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/house_with_colors.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/labels_and_colors.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/shortest_path.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_networkx/simple_graph.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_simple_network_provider/graph_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_simple_network_provider/graph_directed.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_simple_network_provider/graph_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_skbio/leaf_labels.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_skbio/leaf_labels_hmargin.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_skbio/tree_basic.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/baseline_images/test_skbio/tree_radial.png +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_arrows.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_biopython.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_cascades.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_cogent3.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_dendropy.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_edge.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_edge_geometry.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_ete4.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_geometry.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_heuristics.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_igraph.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_igraph_3d.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_ingest_protocols.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_matplotlib_utils.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_network_hotload.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_networkx.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_ports.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_simple_network_provider.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_simple_tree_provider.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_skbio.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_style.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/test_vertex.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/tests/utils.py +0 -0
- {iplotx-0.12.0 → iplotx-1.0.1}/uv.lock +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
[push, pull_request]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install the project
|
|
31
|
+
run: uv sync --all-extras --group test
|
|
32
|
+
|
|
33
|
+
- name: Run pytest
|
|
34
|
+
run: uv run pytest --cov-report term-missing --cov=iplotx tests
|
|
35
|
+
|
|
36
|
+
- name: Coveralls
|
|
37
|
+
uses: coverallsapp/github-action@v2
|
|
38
|
+
with:
|
|
39
|
+
fail-on-error: false
|
|
40
|
+
|
|
41
|
+
- name: Run flake8
|
|
42
|
+
run: uv run flake8 iplotx --count --exit-zero --max-complexity=20 --max-line-length=127 --statistics
|
|
43
|
+
|
|
44
|
+
build_graph_tool:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v5
|
|
53
|
+
|
|
54
|
+
- uses: conda-incubator/setup-miniconda@v3
|
|
55
|
+
with:
|
|
56
|
+
auto-activate-base: false
|
|
57
|
+
auto-update-conda: true
|
|
58
|
+
python-version: ${{ matrix.python-version }}
|
|
59
|
+
activate-environment: gt
|
|
60
|
+
miniforge-version: latest
|
|
61
|
+
channels: conda-forge
|
|
62
|
+
conda-remove-defaults: true
|
|
63
|
+
- name: Conda info
|
|
64
|
+
shell: bash -el {0}
|
|
65
|
+
run: conda info
|
|
66
|
+
- name: Conda list
|
|
67
|
+
shell: bash -el {0}
|
|
68
|
+
run: conda list
|
|
69
|
+
- name: Install graph-tool
|
|
70
|
+
shell: bash -el {0}
|
|
71
|
+
run: conda install -c conda-forge graph-tool
|
|
72
|
+
- name: Install pip
|
|
73
|
+
shell: bash -el {0}
|
|
74
|
+
run: conda install -c conda-forge pip
|
|
75
|
+
- name: Upgrade pip to >= 25.1 (which has dependency groups)
|
|
76
|
+
shell: bash -el {0}
|
|
77
|
+
run: pip install --upgrade pip
|
|
78
|
+
- name: Install deps and package
|
|
79
|
+
shell: bash -el {0}
|
|
80
|
+
run: pip install --group test .
|
|
81
|
+
- name: Check pytest
|
|
82
|
+
shell: bash -el {0}
|
|
83
|
+
run: which pytest
|
|
84
|
+
- name: Run pytest (graph-tool)
|
|
85
|
+
shell: bash -el {0}
|
|
86
|
+
run: pytest tests/test_graph_tool.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: iplotx
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.1
|
|
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
|
|
@@ -53,14 +53,15 @@ Supports:
|
|
|
53
53
|
- **networks**:
|
|
54
54
|
- [networkx](https://networkx.org/)
|
|
55
55
|
- [igraph](igraph.readthedocs.io/)
|
|
56
|
-
- [
|
|
56
|
+
- [graph-tool](https://graph-tool.skewed.de/)
|
|
57
|
+
- [zero-dependency](https://iplotx.readthedocs.io/en/latest/gallery/plot_simplenetworkdataprovider.html#sphx-glr-gallery-plot-simplenetworkdataprovider-py)
|
|
57
58
|
- **trees**:
|
|
58
59
|
- [ETE4](https://etetoolkit.github.io/ete/)
|
|
59
60
|
- [cogent3](https://cogent3.org/)
|
|
60
61
|
- [Biopython](https://biopython.org/)
|
|
61
62
|
- [scikit-bio](https://scikit.bio)
|
|
62
63
|
- [dendropy](https://jeetsukumaran.github.io/DendroPy/index.html)
|
|
63
|
-
- [
|
|
64
|
+
- [zero-dependency](https://iplotx.readthedocs.io/en/latest/gallery/tree/plot_simpletreedataprovider.html#sphx-glr-gallery-tree-plot-simpletreedataprovider-py)
|
|
64
65
|
|
|
65
66
|
In addition to the above, *any* network or tree analysis library can register an [entry point](https://iplotx.readthedocs.io/en/latest/providers.html#creating-a-custom-data-provider) to gain compatibility with `iplotx` with no intervention from our side.
|
|
66
67
|
|
|
@@ -81,7 +82,7 @@ fig, ax = plt.subplots(figsize=(3, 3))
|
|
|
81
82
|
ipx.plot(g, ax=ax, layout=layout)
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-

|
|
85
|
+

|
|
85
86
|
|
|
86
87
|
## Documentation
|
|
87
88
|
See [readthedocs](https://iplotx.readthedocs.io/en/latest/) for the full documentation.
|
|
@@ -90,11 +91,11 @@ See [readthedocs](https://iplotx.readthedocs.io/en/latest/) for the full documen
|
|
|
90
91
|
See [gallery](https://iplotx.readthedocs.io/en/latest/gallery/index.html).
|
|
91
92
|
|
|
92
93
|
## Features
|
|
93
|
-
- Plot networks from multiple libraries including networkx and
|
|
94
|
+
- Plot networks from multiple libraries including networkx, igraph and graph-tool, using Matplotlib. ✅
|
|
94
95
|
- Plot trees from multiple libraries such as cogent3, ETE4, skbio, biopython, and dendropy. ✅
|
|
95
96
|
- Flexible yet easy styling, including an internal library of styles ✅
|
|
96
97
|
- Interactive plotting, e.g. zooming and panning after the plot is created. ✅
|
|
97
|
-
- Store the plot to disk
|
|
98
|
+
- Store the plot to disk in many formats (SVG, PNG, PDF, GIF, etc.). ✅
|
|
98
99
|
- 3D network visualisation with depth shading. ✅
|
|
99
100
|
- Efficient plotting of large graphs (up to ~1 million nodes on a laptop). ✅
|
|
100
101
|
- Edit plotting elements after the plot is created, e.g. changing node colors, labels, etc. ✅
|
|
@@ -15,14 +15,15 @@ Supports:
|
|
|
15
15
|
- **networks**:
|
|
16
16
|
- [networkx](https://networkx.org/)
|
|
17
17
|
- [igraph](igraph.readthedocs.io/)
|
|
18
|
-
- [
|
|
18
|
+
- [graph-tool](https://graph-tool.skewed.de/)
|
|
19
|
+
- [zero-dependency](https://iplotx.readthedocs.io/en/latest/gallery/plot_simplenetworkdataprovider.html#sphx-glr-gallery-plot-simplenetworkdataprovider-py)
|
|
19
20
|
- **trees**:
|
|
20
21
|
- [ETE4](https://etetoolkit.github.io/ete/)
|
|
21
22
|
- [cogent3](https://cogent3.org/)
|
|
22
23
|
- [Biopython](https://biopython.org/)
|
|
23
24
|
- [scikit-bio](https://scikit.bio)
|
|
24
25
|
- [dendropy](https://jeetsukumaran.github.io/DendroPy/index.html)
|
|
25
|
-
- [
|
|
26
|
+
- [zero-dependency](https://iplotx.readthedocs.io/en/latest/gallery/tree/plot_simpletreedataprovider.html#sphx-glr-gallery-tree-plot-simpletreedataprovider-py)
|
|
26
27
|
|
|
27
28
|
In addition to the above, *any* network or tree analysis library can register an [entry point](https://iplotx.readthedocs.io/en/latest/providers.html#creating-a-custom-data-provider) to gain compatibility with `iplotx` with no intervention from our side.
|
|
28
29
|
|
|
@@ -43,7 +44,7 @@ fig, ax = plt.subplots(figsize=(3, 3))
|
|
|
43
44
|
ipx.plot(g, ax=ax, layout=layout)
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-

|
|
47
|
+

|
|
47
48
|
|
|
48
49
|
## Documentation
|
|
49
50
|
See [readthedocs](https://iplotx.readthedocs.io/en/latest/) for the full documentation.
|
|
@@ -52,11 +53,11 @@ See [readthedocs](https://iplotx.readthedocs.io/en/latest/) for the full documen
|
|
|
52
53
|
See [gallery](https://iplotx.readthedocs.io/en/latest/gallery/index.html).
|
|
53
54
|
|
|
54
55
|
## Features
|
|
55
|
-
- Plot networks from multiple libraries including networkx and
|
|
56
|
+
- Plot networks from multiple libraries including networkx, igraph and graph-tool, using Matplotlib. ✅
|
|
56
57
|
- Plot trees from multiple libraries such as cogent3, ETE4, skbio, biopython, and dendropy. ✅
|
|
57
58
|
- Flexible yet easy styling, including an internal library of styles ✅
|
|
58
59
|
- Interactive plotting, e.g. zooming and panning after the plot is created. ✅
|
|
59
|
-
- Store the plot to disk
|
|
60
|
+
- Store the plot to disk in many formats (SVG, PNG, PDF, GIF, etc.). ✅
|
|
60
61
|
- 3D network visualisation with depth shading. ✅
|
|
61
62
|
- Efficient plotting of large graphs (up to ~1 million nodes on a laptop). ✅
|
|
62
63
|
- Edit plotting elements after the plot is created, e.g. changing node colors, labels, etc. ✅
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Artist hierarchy
|
|
2
|
-
`iplotx.
|
|
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 = [
|
|
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
|
+
[](gallery/style/plot_ports.rst)
|
|
8
|
+
:::
|
|
9
|
+
:::{grid-item}
|
|
10
|
+
[](gallery/other/plot_animation.rst)
|
|
11
|
+
:::
|
|
12
|
+
:::{grid-item}
|
|
13
|
+
[](gallery/basic/plot_3d.rst)
|
|
14
|
+
:::
|
|
15
|
+
:::{grid-item}
|
|
16
|
+
[](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/), [igraph](https://python.igraph.org/), and [graph-tool](https://graph-tool.skewed.de/) 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 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
|
-
#
|
|
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.
|
|
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:`
|
|
36
|
-
- 00:00.
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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 `
|
|
47
|
+
There are a few different ways to use a style in `iplotx` (the mechanism is similar to styles in `Matplotlib`).
|
|
48
48
|
|
|
49
|
-
###
|
|
50
|
-
To apply a style to a single plot, you can pass it to the `
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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.
|
|
94
|
+
ipx.network(...)
|
|
118
95
|
# Second plot ALSO uses the same style
|
|
119
|
-
ipx.
|
|
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
|
|
127
|
-
To apply a style permanently (in this Python session), you can use the
|
|
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
|
-
|
|
146
|
-
|
|
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.
|
|
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 `
|
|
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
|
-
|
|
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 `
|
|
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.
|
|
158
|
+
ipx.network(
|
|
180
159
|
G,
|
|
181
160
|
vertex_size={0: 20, 1: 30},
|
|
182
161
|
)
|
|
183
162
|
```
|
|
184
163
|
|
|
185
|
-
|
|
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,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
|
|
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::
|