{ "info": { "author": "Luca Cappelletti", "author_email": "cappelletti.luca94@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": ".. role:: py(code)\n :language: python\n\nPyAdigraph\n============\n\n|travis| |sonar_quality| |sonar_maintainability| |sonar_coverage| |code_climate_maintainability| |pip|\n\nPyadigraph turns your networkx into Adigraph latex package. \n\nThe Latex generated with this package requires `Adigraph (1.7.0+)`_ and the `subfigures` package.\n\nInstallation\n---------------\nAfter having installed Adigraph, you can run:\n\n.. code:: bash\n\n pip installed pyadigraph\n\nExample\n---------------\n\n.. code:: python\n\n from pyadigraph import Adigraph\n import networkx as nx\n\n A = Adigraph(\n vertices_color_fallback=\"gray!90\",\n edges_color_fallback=\"gray!90\",\n sub_caption=\"My adigraph number {i} of {n}\",\n sub_label=\"adigraph_{i}_{n}\",\n row_size=1,\n caption=\"A graph generated with python and latex.\",\n label=\"pyadigraph_example\"\n )\n\n A.add_graph(\n nx.bipartite.random_graph(4, 4, 1),\n vertices_color={\n 0: 'red!90',\n 1: 'red!90',\n 4: 'cyan!90',\n 7: 'cyan!90'\n })\n\n A.save(\"test/result.tex\", document=True)\n\nWhich when generated results in:\n\n.. code:: latex\n\n \\documentclass{report}\n \\usepackage{adigraph}\n \\usepackage{subcaption}\n\n \\begin{document}\n \\begin{figure}\n \\begin{subfigure}{1.0\\textwidth}\n \\NewAdigraph{myAdigraph}{\n 0,red!90,:-0.4386601404141742\\textwidth,0.2091077552922947\\textwidth:;\n 1,red!90,:-0.15708496776680972\\textwidth,0.09630690244229406\\textwidth:;\n 2,gray!90,:0.43887677279554366\\textwidth,-0.2079924280020609\\textwidth:;\n 3,gray!90,:0.15678823839504888\\textwidth,-0.09746320565948384\\textwidth:;\n 4,cyan!90,:-0.3736460590634439\\textwidth,-0.327631363498189\\textwidth:;\n 5,gray!90,:0.3735687548614322\\textwidth,0.3275275669374224\\textwidth:;\n 6,gray!90,:-0.042735184609099336\\textwidth,-0.4998552275122768\\textwidth:;\n 7,cyan!90,:0.0428925858015027\\textwidth,0.5\\textwidth:;\n }{\n 0,4,gray!90,::;\n 0,5,gray!90,::;\n 0,6,gray!90,::;\n 0,7,gray!90,::;\n 1,4,gray!90,::;\n 1,5,gray!90,::;\n 1,6,gray!90,::;\n 1,7,gray!90,::;\n 2,4,gray!90,::;\n 2,5,gray!90,::;\n 2,6,gray!90,::;\n 2,7,gray!90,::;\n 3,4,gray!90,::;\n 3,5,gray!90,::;\n 3,6,gray!90,::;\n 3,7,gray!90,::;\n }[]\n \\myAdigraph{}\n \\caption{My adigraph number 1 of 1}\\label{adigraph_1_1}\n \\end{subfigure}\n \\caption{A graph generated with python and latex.}\\label{pyadigraph_example}\n \\end{figure}\n \\end{document}\n\nAnd when you compile this in your document you get:\n\n|example|\n\n.. _`Adigraph (1.7.0+)`: https://github.com/LucaCappelletti94/adigraph\n.. |example| image:: https://github.com/LucaCappelletti94/pyadigraph/blob/master/example.png?raw=true\n\n.. |travis| image:: https://travis-ci.org/LucaCappelletti94/pyadigraph.png\n :target: https://travis-ci.org/LucaCappelletti94/pyadigraph\n\n.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_pyadigraph&metric=alert_status\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_pyadigraph\n\n.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_pyadigraph&metric=sqale_rating\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_pyadigraph\n\n.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_pyadigraph&metric=coverage\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_pyadigraph\n\n.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/25fb7c6119e188dbd12c/maintainability\n :target: https://codeclimate.com/github/LucaCappelletti94/pyadigraph/maintainability\n :alt: Maintainability\n\n.. |pip| image:: https://badge.fury.io/py/pyadigraph.svg\n :target: https://badge.fury.io/py/pyadigraph", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LucaCappelletti94/pyadigraph", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyadigraph", "package_url": "https://pypi.org/project/pyadigraph/", "platform": "", "project_url": "https://pypi.org/project/pyadigraph/", "project_urls": { "Homepage": "https://github.com/LucaCappelletti94/pyadigraph" }, "release_url": "https://pypi.org/project/pyadigraph/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Pyadigraph turns your networkx into Adigraph latex package.", "version": "0.0.1" }, "last_serial": 4579622, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bf1542d914859b6716da4a92953c50f1", "sha256": "6a09633729dc4ae51e3f9270e0085f6f923784519031507477e18a18a018a63b" }, "downloads": -1, "filename": "pyadigraph-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bf1542d914859b6716da4a92953c50f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12258, "upload_time": "2018-12-10T07:35:22", "url": "https://files.pythonhosted.org/packages/14/be/9a2a3780b9fa9141ba814a08feb8c4c3d505e9dde15ba1006c1f07d10d6b/pyadigraph-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf1542d914859b6716da4a92953c50f1", "sha256": "6a09633729dc4ae51e3f9270e0085f6f923784519031507477e18a18a018a63b" }, "downloads": -1, "filename": "pyadigraph-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bf1542d914859b6716da4a92953c50f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12258, "upload_time": "2018-12-10T07:35:22", "url": "https://files.pythonhosted.org/packages/14/be/9a2a3780b9fa9141ba814a08feb8c4c3d505e9dde15ba1006c1f07d10d6b/pyadigraph-0.0.1.tar.gz" } ] }