termgraph
安装
python3 -m pip install termgraph
工具参数
termgraph -h输出termgraph使用方法和详细参数介绍
「使用方法」usage: termgraph [-h] [--title TITLE] [--width WIDTH] [--format FORMAT] [--suffix SUFFIX] [--no-labels] [--no-values] [--space-between] [--color [COLOR [COLOR ...]]] [--vertical] [--stacked] [--histogram] [--bins BINS] [--different-scale] [--calendar] [--start-dt START_DT] [--custom-tick CUSTOM_TICK] [--delim DELIM] [--verbose] [--label-before] [--version] [filename]draw basic graphs on terminalpositional arguments:「必须参数」filename data file name (comma or space separated). Defaults to stdin.绘图数据:逗 或者t分割optional arguments:「可选参数」 -h, --help show this help message and exit --title TITLE Title of graph,图像名称 --width WIDTH width of graph in characters default:50,图宽 --format FORMAT format specifier to use. --suffix SUFFIX string to add as a suffix to all data points. --no-labels Do not print the label column --no-values Do not print the values at end --space-between Print a new line after every field --color [COLOR [COLOR ...]] Graph bar color( s )图形可选颜色:'red', 'blue', 'green', 'magenta', 'yellow', 'black', 'cyan'「支持图形」: --vertical Vertical graph --stacked Stacked bar graph --histogram Histogram --bins BINS Bins of Histogram --different-scale Categories have different scales. --calendar Calendar Heatmap chart --start-dt START_DT Start date for Calendar chart --custom-tick CUSTOM_TICK Custom tick mark, emoji approved --delim DELIM Custom delimiter, default , or space --verbose Verbose output, helpful for debugging --label-before Display the values before the bars --version Display version and exit
使用demo
#并列条形图termgraph data/ex4.dat --color {cyan,red}
输入数据data/ex4.dat 如下格式:逗 分割
#堆积条形图data/ex7.dat --color {cyan,red} --stacked --title "Stacked Data"
matplotlib_iterm2
不详细介绍了,感兴趣的同学可以去github上玩一玩,效果图,
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!