LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

termgraph

Draw graphs in the terminal

TLDR

Create bar chart from file
$ termgraph [data.txt]
copy
Create chart with custom title
$ termgraph --title "[Monthly Sales]" [data.txt]
copy
Create colored chart
$ termgraph --color [red] [data.txt]
copy
Create vertical bar chart
$ termgraph --vertical [data.txt]
copy
Create stacked bar chart
$ termgraph --stacked [data.txt]
copy
Create histogram
$ termgraph --histogram --bins [10] [data.txt]
copy
Customize chart width
$ termgraph --width [80] [data.txt]
copy
Create chart from stdin
$ cat [data.txt] | termgraph
copy

SYNOPSIS

termgraph [options] [filename]

DESCRIPTION

termgraph is a Python command-line tool that draws basic graphs in the terminal. It supports bar charts, stacked charts, histograms, calendar heatmaps, and can display graphs horizontally or vertically.Data is provided in a simple format with labels in the first column and numeric values in subsequent columns, separated by commas or spaces. Multiple value columns create grouped or stacked charts.The tool supports emoji characters as tick marks, enabling creative visualizations. It can also be used as a Python library for programmatic chart generation.Install via pip: `pip install termgraph`

PARAMETERS

--title title

Title displayed above the graph.
--width n
Width of graph in characters (default: 50).
--format format
Format specifier for values.
--suffix suffix
String appended to all data points.
--no-labels
Hide label column.
--no-values
Hide values at end of bars.
--space-between
Print newline after each row.
--color color
Bar color(s): red, blue, green, magenta, yellow, black, cyan.
--vertical
Display vertical bars.
--stacked
Display stacked bar chart.
--histogram
Display histogram from raw data.
--bins n
Number of histogram bins.
--different-scale
Use different scales per category.
--calendar
Display calendar heatmap.
--start-dt date
Start date for calendar chart.
--custom-tick char
Custom tick mark character (emoji supported).
--delim char
Custom delimiter (default: comma or space).
--verbose
Enable verbose output.

CAVEATS

Requires Python 3. Terminal width limits chart size. Color support depends on terminal capabilities. Complex charts may not render correctly in narrow terminals.

HISTORY

termgraph was created by Marcus Kazmierczak as a simple way to visualize data directly in the terminal. It provides a quick alternative to graphical charting tools for command-line workflows and scripts.

SEE ALSO

gnuplot(1), spark(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid