{ "info": { "author": "Nico Schl\u00f6mer", "author_email": "nico.schloemer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics", "Topic :: System :: Shells" ], "description": "# termplotlib\n\n[![CircleCI](https://img.shields.io/circleci/project/github/nschloe/termplotlib/master.svg)](https://circleci.com/gh/nschloe/termplotlib)\n[![codecov](https://img.shields.io/codecov/c/github/nschloe/termplotlib.svg)](https://codecov.io/gh/nschloe/termplotlib)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPi Version](https://img.shields.io/pypi/v/termplotlib.svg)](https://pypi.org/project/termplotlib)\n[![GitHub stars](https://img.shields.io/github/stars/nschloe/termplotlib.svg?logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/termplotlib)\n[![PyPi downloads](https://img.shields.io/pypi/dm/termplotlib.svg)](https://pypistats.org/packages/termplotlib)\n\ntermplotlib is a Python library for all your terminal plotting needs. It aims to work\nlike [matplotlib](https://matplotlib.org/).\n\n\n### Line plots\n\nFor line plots, termplotlib relies on [gnuplot](http://www.gnuplot.info/). With that installed, the code\n```python\nimport termplotlib as tpl\nimport numpy\n\nx = numpy.linspace(0, 2 * numpy.pi, 10)\ny = numpy.sin(x)\n\nfig = tpl.figure()\nfig.plot(x, y, label=\"data\", width=50, height=15)\nfig.show()\n```\nproduces\n```\n 1 +---------------------------------------+\n 0.8 | ** ** |\n 0.6 | * ** data ******* |\n 0.4 | ** |\n 0.2 |* ** |\n 0 | ** |\n | * |\n -0.2 | ** ** |\n -0.4 | ** * |\n -0.6 | ** |\n -0.8 | **** ** |\n -1 +---------------------------------------+\n 0 1 2 3 4 5 6 7\n```\n\n### Horizontal histograms\n\n```python\nimport termplotlib as tpl\nimport numpy\n\nnumpy.random.seed(123)\nsample = numpy.random.normal(size=1000)\ncounts, bin_edges = numpy.histogram(sample)\n\nfig = tpl.figure()\nfig.hist(counts, bin_edges, orientation=\"horizontal\", force_ascii=False)\nfig.show()\n```\nproduces\n\n![hist1](https://nschloe.github.io/termplotlib/hist1.png)\n\nHorizontal bar charts are covered as well. This\n```python\nfig = tpl.figure()\nfig.barh(\n [3, 10, 5, 2],\n ['Cats', 'Dogs', 'Cows', 'Geese'],\n force_ascii=True\n)\nfig.show()\n```\nproduces\n```\nCats [ 3] ************\nDogs [10] ****************************************\nCows [ 5] ********************\nGeese [ 2] ********\n```\n\n### Vertical histograms\n\n```python\nimport termplotlib as tpl\nimport numpy\n\nnumpy.random.seed(123)\nsample = numpy.random.normal(size=1000)\ncounts, bin_edges = numpy.histogram(sample, bins=40)\nfig = tpl.figure()\nfig.hist(counts, bin_edges, grid=[15, 25], force_ascii=False)\nfig.show()\n```\nproduces\n\n![hist2](https://nschloe.github.io/termplotlib/hist2.png)\n\n\n### Tables\n\nSupport for tables has moved over to\n[termtables](https://github.com/nschloe/termtables).\n\n\n### Installation\n\ntermplotlib is [available from the Python Package\nIndex](https://pypi.org/project/termplotlib/), so simply do\n```\npip3 install -U termplotlib\n```\nto install or upgrade. Use `sudo -H` to install as root or the `--user` option\nof `pip3` to install in `$HOME`.\n\n\n### Testing\n\nTo run the termplotlib unit tests, check out this repository and type\n```\npytest\n```\n\n### License\n\ntermplotlib is published under the [MIT license](https://en.wikipedia.org/wiki/MIT_License).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nschloe/termplotlib", "keywords": "", "license": "License :: OSI Approved :: MIT License", "maintainer": "", "maintainer_email": "", "name": "termplotlib", "package_url": "https://pypi.org/project/termplotlib/", "platform": "", "project_url": "https://pypi.org/project/termplotlib/", "project_urls": { "Homepage": "https://github.com/nschloe/termplotlib" }, "release_url": "https://pypi.org/project/termplotlib/0.2.3/", "requires_dist": null, "requires_python": ">=3", "summary": "Plotting on the command line", "version": "0.2.3" }, "last_serial": 5891826, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "b947a5749b4af9dd18ed621c3eb1d7d3", "sha256": "749542b2b9a38100d882c00023e851be191e70499af0b5ad551da4d797fbb7ac" }, "downloads": -1, "filename": "termplotlib-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b947a5749b4af9dd18ed621c3eb1d7d3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 9297, "upload_time": "2019-09-26T17:38:45", "url": "https://files.pythonhosted.org/packages/83/34/f2402d14483857d19887cee2eafe16d7e6f23c879fa2136551b5492975df/termplotlib-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90126a458907334d09f02db34504f5ad", "sha256": "66a6432c527c721cd81ff47b4e7696da91c2b194b7a609ec9698a1c786895428" }, "downloads": -1, "filename": "termplotlib-0.2.3.tar.gz", "has_sig": false, "md5_digest": "90126a458907334d09f02db34504f5ad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 9455, "upload_time": "2019-09-26T17:38:48", "url": "https://files.pythonhosted.org/packages/24/c5/17e53133f047b1772444a53a80653b70b0d09b7251d50b50a28a2d000539/termplotlib-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b947a5749b4af9dd18ed621c3eb1d7d3", "sha256": "749542b2b9a38100d882c00023e851be191e70499af0b5ad551da4d797fbb7ac" }, "downloads": -1, "filename": "termplotlib-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b947a5749b4af9dd18ed621c3eb1d7d3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 9297, "upload_time": "2019-09-26T17:38:45", "url": "https://files.pythonhosted.org/packages/83/34/f2402d14483857d19887cee2eafe16d7e6f23c879fa2136551b5492975df/termplotlib-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90126a458907334d09f02db34504f5ad", "sha256": "66a6432c527c721cd81ff47b4e7696da91c2b194b7a609ec9698a1c786895428" }, "downloads": -1, "filename": "termplotlib-0.2.3.tar.gz", "has_sig": false, "md5_digest": "90126a458907334d09f02db34504f5ad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 9455, "upload_time": "2019-09-26T17:38:48", "url": "https://files.pythonhosted.org/packages/24/c5/17e53133f047b1772444a53a80653b70b0d09b7251d50b50a28a2d000539/termplotlib-0.2.3.tar.gz" } ] }