{"id":13566054,"url":"https://github.com/tehmaze/diagram","last_synced_at":"2025-04-04T07:08:19.376Z","repository":{"id":22110801,"uuid":"25441251","full_name":"tehmaze/diagram","owner":"tehmaze","description":"Text mode diagrams using UTF-8 characters and fancy colors","archived":false,"fork":false,"pushed_at":"2022-04-13T17:56:28.000Z","size":176,"stargazers_count":404,"open_issues_count":3,"forks_count":23,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-28T06:11:10.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/diagram/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tehmaze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-19T21:45:37.000Z","updated_at":"2025-01-10T22:03:40.000Z","dependencies_parsed_at":"2022-08-19T12:00:07.877Z","dependency_job_id":null,"html_url":"https://github.com/tehmaze/diagram","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fdiagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fdiagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fdiagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tehmaze%2Fdiagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tehmaze","download_url":"https://codeload.github.com/tehmaze/diagram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"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":[],"created_at":"2024-08-01T13:02:01.082Z","updated_at":"2025-04-04T07:08:19.360Z","avatar_url":"https://github.com/tehmaze.png","language":"Python","funding_links":[],"categories":["Python","Python tools","Not in PyViz"],"sub_categories":["Misc"],"readme":"# diagram\n\nText mode diagrams using UTF-8 characters and fancy colors (using Python).\n\n[![Build Status][cib]][ci] [![Code Health][lsb]][ls]\n\n[ci]: https://travis-ci.org/tehmaze/diagram\n[cib]: https://travis-ci.org/tehmaze/diagram.svg\n[ls]: https://landscape.io/github/tehmaze/diagram/issue/9/custom_colors\n[lsb]: https://landscape.io/github/tehmaze/diagram/issue/9/custom_colors/landscape.svg?style=flat\n\n## Features\n\n * Axial graphs\n * Horizontal and vertical bar graphs\n * Supports both 3 bit (16 color) and 8 bit (256 color) mode colors with\n   various pre-defined palettes (see below)\n * UTF-8 text graphics\n\n## Installation\n\n### System requirements for Fedora Core 24:\n\n    dnf install ncurses-devel ncurses-compat-libs\n\nIt's recommended to use pip to install/update.\n\nTo install:\n\n    $ sudo pip install diagram\n\nTo update:\n\n    $ sudo pip install -U diagram\n\nTo install from github:\n\n    $ sudo pip install git+https://github.com/tehmaze/diagram.git\n\n## Examples\n\nPictures say more than a thousand words.\n\n### Axis graph\n\n![Axis Graph](https://github.com/tehmaze/diagram/raw/master/doc/axisgraph.png)\n\n### Horizontal bar graph\n\n![Horizontal bar graph](https://github.com/tehmaze/diagram/raw/master/doc/horizontalbar.png)\n\nDrawing characters used:\n\n    ▏ ▎ ▍ ▌ ▋ ▊ ▉ █\n\n### Vertical bar graph\n\n![Vertical bar graph](https://github.com/tehmaze/diagram/raw/master/doc/verticalbar.png)\n\nDrawing characters used:\n\n    ▁ ▂ ▃ ▄ ▅ ▆ ▇ █\n\n\n## Usage\n\nUse `diagram --help` for documentation:\n\n    usage: diagram [-h] [-G] [-H] [-V] [-a] [-A] [-c] [-C] [-l] [-L]\n                   [-f function] [-p palette] [-x characters] [-y characters]\n                   [-r] [-b] [-s SLEEP] [-i file] [-o file] [-e ENCODING]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n\n    optional drawing mode:\n      -G, --graph           axis drawing mode (default)\n      -H, --horizontal-bars\n                            horizontal drawing mode\n      -V, --vertical-bars   vertical drawing mode\n\n    optional drawing arguments:\n      -a, --axis            draw axis (default: yes)\n      -A, --no-axis         don't draw axis\n      -c, --color           use colors (default: yes)\n      -C, --no-color        don't use colors\n      -l, --legend          draw y-axis legend (default: yes)\n      -L, --no-legend       don't draw y-axis legend\n      -f function, --function function\n                            curve manipulation function, use \"help\" for a list\n      -p palette, --palette palette\n                            palette name, use \"help\" for a list\n      -x characters, --width characters\n                            drawing width (default: auto)\n      -y characters, --height characters\n                            drawing height (default: auto)\n      -r, --reverse         reverse draw graph\n\n    optional input and output arguments:\n      -b, --batch           batch mode (default: no)\n      -k, --keys            input are key-value pairs (default: no) (1)\n      -s SLEEP, --sleep SLEEP\n                            batch poll sleep time (default: none)\n      -i file, --input file\n                            input file (default: stdin)\n      -o file, --output file\n                            output file (default: stdout)\n      -e ENCODING, --encoding ENCODING\n                            output encoding (default: auto)\n\n    (1): only works for the horizontal bar graph, the first argument is the key\n    and the second value is the data point.\n\n### `--function ...`\n\nThe parameter can be just the function name or the function name with arguments,\nfor example:\n\n    diagram -f log\n\nor, with an argument:\n\n    diagram -f log:e\n\n#### log\n\nSymmetrical logarithmic scale.\n\n#### smooth\n\nSmooth (and optionally differentiate) data with a Savitzky-Golay filter.\n\n### `--palette ...`\n\n#### default / spectrum\n\n![Palette Spectrum](https://github.com/tehmaze/diagram/raw/master/doc/palette-spectrum.png)\n\n#### grey\n\n![Palette Grey](https://github.com/tehmaze/diagram/raw/master/doc/palette-grey.png)\n\n#### red\n\n![Palette Red](https://github.com/tehmaze/diagram/raw/master/doc/palette-red.png)\n\n#### green\n\n![Palette Green](https://github.com/tehmaze/diagram/raw/master/doc/palette-green.png)\n\n#### blue\n\n![Palette Blue](https://github.com/tehmaze/diagram/raw/master/doc/palette-blue.png)\n\n## Library Usage\n\n    from diagram import DGWrapper\n    gram = DGWrapper(data=[points, values])\n    gram.show()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftehmaze%2Fdiagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftehmaze%2Fdiagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftehmaze%2Fdiagram/lists"}