gitmyhub

YouPlot

Ruby ★ 4.8k updated 16d ago

A command line tool that draw plots on the terminal.

YouPlot lets you draw charts and graphs directly in your terminal by piping data into the `uplot` command, no browser or graphical interface needed.

RubyCLIUnicodePlotsetup: easycomplexity 1/5

YouPlot is a command-line tool that draws charts and graphs directly in your terminal window, without needing any graphical interface or web browser. You run it with the command uplot, pipe your data into it, and it renders a visual plot right there in the text output. It was built by the red-data-tools team and is written in Ruby.

The tool supports several chart types: bar charts, histograms, line charts, scatter plots, density plots, and box plots. You can also use a count mode that tallies how often each value appears and draws a bar chart of those counts. Each chart type has a short alias (for example, bar for barplot, hist for histogram) so you can type quickly at the command line.

Data comes in as tab-separated or comma-separated text. You can feed it from a file, from another command's output via a pipe, or even from network requests using tools like curl. If your data has a header row, you pass the -H flag to tell YouPlot to treat the first line as column names. You can also control which column goes on which axis and adjust things like the number of bins in a histogram or the width and height of the chart.

One practical use is dropping YouPlot into a longer pipeline: it can pass the raw data through to the next command in the chain while still drawing the chart to standard error, so you can inspect data visually mid-pipeline without interrupting the flow. An experimental progress mode lets you watch a live-updating chart as data arrives in real time, though that feature is still under development.

Installation is available through several package managers, including Homebrew for Mac, the Ruby gem system, Nix, Guix, and Conda. The project is open source under the MIT license.

Where it fits