{"id":15620346,"url":"https://github.com/nschloe/betterspy","last_synced_at":"2025-06-19T00:07:59.012Z","repository":{"id":11793331,"uuid":"14336854","full_name":"nschloe/betterspy","owner":"nschloe","description":":eyes: Visualization for SciPy sparse matrices.","archived":false,"fork":false,"pushed_at":"2021-05-26T15:58:08.000Z","size":1204,"stargazers_count":41,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T13:13:09.344Z","etag":null,"topics":["mathematics","matrix","pypi","python","sparse-matrices","sparse-matrix","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nschloe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-12T15:51:46.000Z","updated_at":"2025-03-06T21:56:46.000Z","dependencies_parsed_at":"2022-09-14T11:31:55.330Z","dependency_job_id":null,"html_url":"https://github.com/nschloe/betterspy","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nschloe/betterspy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fbetterspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fbetterspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fbetterspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fbetterspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nschloe","download_url":"https://codeload.github.com/nschloe/betterspy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nschloe%2Fbetterspy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260654685,"owners_count":23042679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathematics","matrix","pypi","python","sparse-matrices","sparse-matrix","visualization"],"created_at":"2024-10-03T09:01:14.639Z","updated_at":"2025-06-19T00:07:53.969Z","avatar_url":"https://github.com/nschloe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# betterspy\n\n[![PyPi Version](https://img.shields.io/pypi/v/betterspy.svg?style=flat-square)](https://pypi.org/project/betterspy)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/betterspy.svg?style=flat-square)](https://pypi.org/pypi/betterspy/)\n[![GitHub stars](https://img.shields.io/github/stars/nschloe/betterspy.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/nschloe/betterspy)\n[![PyPi downloads](https://img.shields.io/pypi/dm/betterspy.svg?style=flat-square)](https://pypistats.org/packages/betterspy)\n\n[![Discord](https://img.shields.io/static/v1?logo=discord\u0026label=chat\u0026message=on%20discord\u0026color=7289da\u0026style=flat-square)](https://discord.gg/hnTJ5MRX2Y)\n\n[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/betterspy/ci?style=flat-square)](https://github.com/nschloe/betterspy/actions?query=workflow%3Aci)\n[![codecov](https://img.shields.io/codecov/c/github/nschloe/betterspy.svg?style=flat-square)](https://codecov.io/gh/nschloe/betterspy)\n[![LGTM](https://img.shields.io/lgtm/grade/python/github/nschloe/betterspy.svg?style=flat-square)](https://lgtm.com/projects/g/nschloe/betterspy)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n\nShow sparsity patterns of sparse matrices or write them to image files.\n\nExample:\n```python\nimport betterspy\nfrom scipy import sparse\n\nA = sparse.rand(20, 20, density=0.1)\n\n# betterspy.plot()\n# set attributes on gca()\n# plt.show()\n# or directly\n\nbetterspy.show(A)\n\nbetterspy.write_png(\n    \"out.png\",\n    A,\n    # border_width=2,\n    # border_color=\"red\",\n    # colormap=\"viridis\"\n)\n```\n\n\u003cimg src=\"https://nschloe.github.io/betterspy/plain.png\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/viridis.png\"\u003e\n:-------------------:|:------------------:|\nno colormap          |  viridis           |\n\nThere is a command-line tool that can be used to show\n[matrix-market](https://math.nist.gov/MatrixMarket/) or\n[Harwell-Boeing](https://en.wikipedia.org/wiki/Harwell-Boeing_file_format) files:\n```\nbetterspy msc00726.mtx [out.png]\n```\nSee `betterspy -h` for all options.\n\n### Gallery\n\n\u003cimg src=\"https://nschloe.github.io/betterspy/bp_200.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/bp_600.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/Chebyshev2.mtx.png\" width=\"70%\"\u003e\n:---------:|:------------:|:---------------:|\n`bp_200`   |  `bp_600`    |  `Chebyshev2`   |\n\n\u003cimg src=\"https://nschloe.github.io/betterspy/orani678.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/rajat19.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/rdb1250l.mtx.png\" width=\"70%\"\u003e\n:---------:|:------------:|:---------------:|\n`orani678`   |  `rajat19`    |  `rdb1250l`   |\n\n\u003cimg src=\"https://nschloe.github.io/betterspy/rdb3200l.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/west0989.mtx.png\" width=\"70%\"\u003e | \u003cimg src=\"https://nschloe.github.io/betterspy/west1505.mtx.png\" width=\"70%\"\u003e\n:---------:|:------------:|:---------------:|\n`rdb3200l`   |  `west0989`    |  `west1505`   |\n\n\n### Installation\n\nbetterspy is [available from the Python Package\nIndex](https://pypi.org/project/betterspy/), so simply do\n```\npip install betterspy\n```\nto install.\n\n\n### License\nThis software is published under the [GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnschloe%2Fbetterspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnschloe%2Fbetterspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnschloe%2Fbetterspy/lists"}