Package: diagram
# diagramText mode diagrams using UTF-8 characters and fancy colors (using Python).[![Build Status][cib]][ci] [![Code Health][lsb]][ls][ci]:https://travis-ci.org/tehmaze/diagram[cib]:https://travis-ci.org/tehmaze/diagram.svg[ls]:https://landscape.io/github/tehmaze/diagram/issue/9/custom_colors[lsb]:https://landscape.io/github/tehmaze/diagram/issue/9/custom_colors/landscape.svg?style=flat## FeaturesAxial graphsHorizontal and vertical bar graphsSupports both 3 bit (16 color) and 8 bit (256 color) mode colors with
various pre-defined palettes (see below)UTF-8 text graphics## Installation### System requirements for Fedora Core 24:dnf install ncurses-devel ncurses-compat-libsIt’s recommended to use pip to install/update.To install:$ sudo pip install diagramTo update:$ sudo pip install -U diagramTo install from github:$ sudo pip install git+https://github.com/tehmaze/diagram.git## ExamplesPictures say more than a thousand words.### Axis graph![Axis Graph](https://github.com/tehmaze/diagram/raw/master/doc/axisgraph.png)### Horizontal bar graph![Horizontal bar graph](https://github.com/tehmaze/diagram/raw/master/doc/horizontalbar.png)Drawing characters used:▏ ▎ ▍ ▌ ▋ ▊ ▉ █### Vertical bar graph![Vertical bar graph](https://github.com/tehmaze/diagram/raw/master/doc/verticalbar.png)Drawing characters used:▁ ▂ ▃ ▄ ▅ ▆ ▇ █## UsageUsediagram –helpfor documentation:usage: diagram [-h] [-G] [-H] [-V] [-a] [-A] [-c] [-C] [-l] [-L][-f function] [-p palette] [-x characters] [-y characters]
[-r] [-b] [-s SLEEP] [-i file] [-o file] [-e ENCODING]optional arguments:-h,--helpshow this help message and exitoptional drawing mode:-G,--graphaxis drawing mode (default)-H,--horizontal-barshorizontal drawing mode-V,--vertical-barsvertical drawing modeoptional drawing arguments:-a,--axisdraw axis (default: yes)-A,--no-axisdon’t draw axis-c,--coloruse colors (default: yes)-C,--no-colordon’t use colors-l,--legenddraw y-axis legend (default: yes)-L,--no-legenddon’t draw y-axis legend-ffunction,--functionfunctioncurve manipulation function, use “help” for a list-ppalette,--palettepalettepalette name, use “help” for a list-xcharacters,--widthcharactersdrawing width (default: auto)-ycharacters,--heightcharactersdrawing height (default: auto)-r,--reversereverse draw graphoptional input and output arguments:-b,--batchbatch mode (default: no)-k,--keysinput are key-value pairs (default: no) (1)-sSLEEP,--sleepSLEEPbatch poll sleep time (default: none)-ifile,--inputfileinput file (default: stdin)-ofile,--outputfileoutput file (default: stdout)-eENCODING,--encodingENCODINGoutput encoding (default: auto)(1): only works for the horizontal bar graph, the first argument is the key
and the second value is the data point.###–function …The parameter can be just the function name or the function name with arguments,
for example:diagram -f logor, with an argument:diagram -f log:e#### logSymmetrical logarithmic scale.#### smoothSmooth (and optionally differentiate) data with a Savitzky-Golay filter.###–palette …#### default / spectrum![Palette Spectrum](https://github.com/tehmaze/diagram/raw/master/doc/palette-spectrum.png)#### grey![Palette Grey](https://github.com/tehmaze/diagram/raw/master/doc/palette-grey.png)#### red![Palette Red](https://github.com/tehmaze/diagram/raw/master/doc/palette-red.png)#### green![Palette Green](https://github.com/tehmaze/diagram/raw/master/doc/palette-green.png)#### blue![Palette Blue](https://github.com/tehmaze/diagram/raw/master/doc/palette-blue.png)## Library Usagefrom diagram import DGWrapper
gram = DGWrapper(data=[points, values])
gram.show()