CLI tool
red-data-tools/YouPlot avatar
red-data-tools/YouPlot

YouPlot: plots on stderr so the data can keep moving through the pipe

A command line tool that draw plots on the terminal.

4,877 stars72 forksRubyMIT

At a glance

What is it?
YouPlot is a Ruby command line plotting tool that reads TSV from stdin or files and draws bars, lines, histograms, scatter, density, box and count plots in the terminal using Unicode. Its design bet is visible in one flag: the plot goes to standard error by default, and the -O flag passes the input data to standard output, so a chart need not block the pipeline underneath it.
Who is it for?
Adopt YouPlot when you want a chart inside a shell pipeline or an SSH session without shipping data anywhere, and when reading a plot as ASCII in a terminal is good enough. Do not adopt it for a large count aggregation, since the README calls `count` slow because it runs in a Ruby script and points you at `sort | uniq -c` instead.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 21 days ago.
What is it written in?
Mainly Ruby, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • red-data-tools/YouPlot4,877 ★ · +25
Star history
Repository2026-09-232026-11-14
red-data-tools/YouPlot4.9k4.9k

25 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The plot goes to stderr, the data goes to stdout

Most plotting tools fight the shell by writing everything to one stream. YouPlot separates them. By default the plot is written to standard error output, and the input data is not shown anywhere, which means a command like `ps aux | uplot count` prints its bars on screen while stdout stays clean. Two flags move the pieces around. `-o -` sends the plot to standard output instead, and `-O` passes the input data straight through to standard output. Combine them and the tool becomes a filter that reads data and writes both a chart and the data onward, which is the shape the usage table documents:

| Command | Description | | ---------------------------------------------- | --------------------------------- | | `cat data.tsv \| uplot <command> [options]` | Take input from stdin | | `uplot <command> [options] data.tsv ...` | Take input from files | | `pipeline1 \| uplot <command> -O \| pipeline2` | Outputs data from stdin to stdout |

The binary is `youplot` and `uplot` is its shortened form; either name works. That split is also what makes the tool safe inside a script that already captures stdout, which is the situation `ps aux | uplot count` creates without anyone having to think about it.

First column is x, second is y, and --fmt is the escape hatch

Column semantics are fixed rather than declared. YouPlot treats the first column as the X axis and the second as the Y axis, and with multiple series the first column stays X while the second and third become Y1 and Y2 in turn. Pass a single column to `line` or `bar` and a sequential number starting from 1 becomes the X axis. When the data does not fit that shape, `--fmt` takes forms like `xyy`, `xyxy` and `yx`, and the README is candid that the option may be renamed in the future and that `-x` and `-y` for explicit column selection might arrive later. Until then the workarounds are Unix tools: `awk '{print $2, $1}'` to swap two columns, and `paste` to concatenate series side by side. Categorical data is where that bites hardest, and the README answers it by reshaping the table before plotting with GNU datamash, grouping and collapsing columns until the output arrives in the order a subcommand expects.

The count subcommand admits it is slow

Counting occurrences is the one subcommand the README qualifies. Counting processes by user is one line:

sh
ps aux | awk '{print $1}' | uplot count

And counting how many gene annotations land on each chromosome is another, with a title and a colour:

sh
cat gencode.v35.annotation.gff3 \
| grep -v '#' | grep 'gene' | cut -f1 \
| uplot count -t "The number of human gene annotations per chromosome"  -c blue

The note under it is the useful part: `count` is not very fast because it runs in a Ruby script, which is fine while the data is small. For anything larger the README gives the replacement, which is to do the aggregation with Unix tools and let `bar` draw it:

sh
cat gencode.v35.annotation.gff3 | grep -v '#' | grep 'gene' | cut -f1 \
| sort | uniq -c | sort -nrk1 \
| uplot bar --fmt yx -d ' ' -t "The number of human gene annotations per chromosome"  -c blue

Note the `--fmt yx` and `-d ' '`, because that output is count and label rather than x and y.

Every online example has an offline twin

Most examples in the README begin with `curl -sL` against a shortened URL, which makes the documentation depend on a network call that may one day answer with something else. Each of those has a local substitute, and together they are the fastest way to see what a subcommand draws. Bars come from your own directory listing:

sh
ls -l | awk '{print $9, $5}' | sort -nk 2 | uplot bar -d ' '

A sine wave needs no data file at all:

sh
python3 - <<'PY' | uplot line
from math import sin, pi

for i in range(101):
    print(f"{i*pi/50}\t{sin(i*pi/50)}")
PY

And scatter, density and boxplot all read the same checked-in fixture, `test/fixtures/iris.csv`, cut to four columns and marked with `-H` for the header line. The histogram example pipes numpy output through python3 into `uplot hist --nbins 20`.

One install route wants a compiler, which says what this is

Five routes are documented, and they are ordinary Ruby packaging:

code
brew install youplot
code
gem install youplot
code
nix shell nixpkgs#youplot
code
guix install youplot

The conda route is the revealing one, because it installs the toolchain before the gem:

code
conda install -c conda-forge ruby
conda install -c conda-forge compilers
gem install youplot

For anyone who does not want a local Ruby at all, the README points at YouPlot2, a portable version with pre-built binaries. Otherwise the trade is a Ruby toolchain on your machine. The project sits under the red-data-tools organisation and draws through UnicodePlot.

The subcommand table is the entire API

What YouPlot can draw is one table:

| command | short | how it works | | --------- | ----- | -------------------------------------------------------- | | barplot | bar | draw a horizontal barplot | | histogram | hist | draw a horizontal histogram | | lineplot | line | draw a line chart | | lineplots | lines | draw a line chart with multiple series | | scatter | s | draw a scatter plot | | density | d | draw a density plot | | boxplot | box | draw a horizontal boxplot | | | | | | count | c | draw a barplot based on the number of occurrences (slow) | | | | | | colors | color | show the list of available colors |

Two details hide in there. The short names are not predictable, so `scatter` is `s` while `density` is `d`, and knowing that is the difference between typing `uplot s` and guessing. And `colors` exists because the `-c` flag used in the count example is not an arbitrary word. Each subcommand carries its own detailed help, reachable with `uplot hist --help`, and one mode is flagged as unfinished: `-p` and `--progress` for progressive rendering, shown as `ruby -e 'loop{puts rand(100)}' | uplot line --progress`, described as experimental and under development.

A Steepfile and sig/ say the codebase is typed

The repository is small and structured like a gem rather than an application: `exe/` for the entry point, `lib/` for the code, `sig/` for type signatures, `test/` for the suite, plus `Gemfile`, `Rakefile`, `Steepfile`, `youplot.gemspec` and a `logo.svg`. The `sig/` directory with a `Steepfile` is the notable part, since Steep is a type checker for Ruby. Release history is uneven: v0.4.5 on 2023-01-09, v0.4.6 on 2024-07-20, then v0.5.0 on 2026-05-24, with the last recorded push dated 2026-10-24. License is MIT. Anyone pinning a version should decide whether they want the 0.4 line or 0.5.

Editorial conclusion

Adopt YouPlot when you want a chart inside a shell pipeline or an SSH session without shipping data anywhere, and when reading a plot as ASCII in a terminal is good enough. Do not adopt it for a large count aggregation, since the README calls `count` slow because it runs in a Ruby script and points you at `sort | uniq -c` instead. Verify first that your terminal handles the Unicode block characters, and pin a release: the newest tag is v0.5.0 from 2026-05-24, following a gap after v0.4.6 in 2024.

Frequently asked questions

What is You Plot?

YouPlot is a command line tool that draws plots on the terminal, powered by the UnicodePlot library. It reads tab or delimited text from stdin or files and renders bar, histogram, line, scatter, density, box and count plots as Unicode in your terminal.

How do I install YouPlot?

Five routes are documented: brew install youplot, gem install youplot, nix shell nixpkgs#youplot, guix install youplot, or the conda route, which installs ruby and compilers from conda-forge before installing the gem. Pre-built binaries exist in a separate portable version called YouPlot2.

How do I plot a file instead of a pipe with YouPlot?

Pass the file as an argument, uplot <command> [options] data.tsv, or pipe it in. Tab is the default delimiter, so -d is only needed for other separators such as a blank space, and -H marks input whose first line is a header.

Why does YouPlot write the plot to standard error?

So standard output stays free for data. The plot goes to stderr by default, -o - sends the plot to stdout instead, and -O passes the input data through to stdout so the same command can feed a downstream stage of the pipeline.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. red-data-tools/YouPlot on GitHub
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/red-data-tools-youplot.svg)](https://hysenlabs.com/projects/red-data-tools-youplot)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/red-data-tools-youplot.svg)](https://hysenlabs.com/projects/red-data-tools-youplot)

Was this useful?