View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Steffen Müller > Math-SimpleHisto-XS-CLI-1.07 > continuoushist


Annotate this POD

View/Report Bugs


continuoushist - simple text histograms -- updating as data comes in


  generator | continuoushist [--sort] [--width=<ncols>] [--style=<ident>]
                             [--numeric-format|nf=<printf format>]
                             [--nostats] [--timestamp|ts] [--xw]
                             [--stepsize=X] [--log] [--cumulative]
                             [--nbins=X] --min=X --max=X

Reads whitespace-separated numbers from STDIN, generates a histogram, and continuously re-renders an ASCII histogram in your terminal as it keeps reading data. Consider it a combination of the histify and the drawasciihist tools. You may want to read up on those separately before continuing with this.

Histogram boundaries need to be specified using the --min and --max options. The number of bins defaults to the height of your terminal.

Using --desc=<type> adds an extra column to the output before the histogram content (separated by a tab) that can be any one of: The bin "number", the bin "center", the "left" bin boundary, the "right" bin boundary, or the bin "range" (lower and upper boundary separated by a comma).

The --xw option will cause continuoushist to read alternating X values and weights instead of just X values from STDIN.

The --cumulative option causes continuoushist to display the cumulative histogram of the input.

The output histogram width is determined automatically from your terminal size, if any. Otherwise assumes 80 columns. You can set the width explicitly using --width=ncols. The --sort option sorts the bins by content instead of input order.

If the --numeric-format option is present, then the actual numeric value is included in the histogram using the given printf format. For positive integers, you would use --nf='%u', for signed integers, use --nf='%i' and for fixed precision floats, you can use something like --nf='%.2f'.

You can choose the character to be used for drawing histograms with the --style=[character] option. The characters '-', '=', '~' are special cased to use an arrow-like appearance.

The --timestamp option will case bin descriptions to be passed through localtime() to convert from Unix timestamps to human-readable time strings.

The --log option draws the histogram on a logarithmic scale. The --nostats option supresses output of the header line.

syntax highlighting: