Terminal plotting
05c82bac — Damien Tardy-Panis 19 days ago
Remove TODO file
66f4d12c — Damien Tardy-Panis 19 days ago
Use table driven tests for plot.SetData
b0f66a9d — Damien Tardy-Panis 20 days ago
No need to put default values in simple help message


browse  log 



You can also use your local clone with git send-email.


Terminal plotting

Small utility for plotting a simple graph right within your terminal

#(Planned) Features

  • Both final and real-time plotting from standard input data Whether you're interested only in the final graph or in seeing the evolution over time for a quick monitoring for example.

  • Define plott width and height Not having a full-screen display allows to keep some useful related context in view just above the graph.

  • Multiple types of graph Only the most common and useful types of graph are supported:

    • scatter plot
    • line chart
    • bar chart
    • histogram
  • Option to plot only last x points Mostly useful for monitoring of time series data in a real-time plotting.

  • Basic statistics over data Display the most common and useful statistics over the data such as average, minimum and maximum.



  • go
  • scdoc
# build all

# build executable only
make plott

# build documentation only
make doc

# install (as root user)
# supports common DESTDIR and PREFIX variables
make install

#Terminal requirements

The terminal must be able to display UTF-8 characters. An option to use ASCII only characters might be added later.

For the real-time plotting only, plott makes use of the following non standard ANSI, but popular, terminal control CSI sequences:

  • CSI s (save current cursor position)
  • CSI u (restore saved cursor position)
  • CSI ? 25 h (show cursor)
  • CSI ? 25 l (hide cursor)

#(Planned) Limitations

  • Not optimized for long running plotting or massive datasets Plott is for example not meant to be used in a custom terminal monitoring dashboard running all day long. While there shouldn't be any functional problem with it, there is no downsampling system in place to reduce the amount of data and so the memory usage would just keep increasing over time. An exception to this might be made when plotting only the last x points where we would keep only x values in memory and the minimum and maximum from previous values.

  • No multiple graphs display at once While the display of multiple graphs could sometimes be useful, plotting a single graph should be good enough for most use cases and keep the implementation and usage simpler. This feature might be considered in a v2 breaking version.


See alternatives file for similar tools