diff --git a/doc/content-for-reference.html b/doc/content-for-reference.html index 47f0b9887..d25d68986 100644 --- a/doc/content-for-reference.html +++ b/doc/content-for-reference.html @@ -265,6 +265,17 @@ POKI_RUN_COMMAND{{mlr filter '$name =~ $regex' data/regex-in-data.dat}}HERE

Data transformations

+ +

bar

+ +

Cheesy bar-charting. + +POKI_RUN_COMMAND{{mlr bar -h}}HERE + +POKI_RUN_COMMAND{{mlr --opprint cat data/small}}HERE + +POKI_RUN_COMMAND{{mlr --opprint bar -l 0 -u 1 -f x,y data/small}}HERE +

cat

diff --git a/doc/reference.html b/doc/reference.html index 53140e102..fd82f88c0 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -103,6 +103,7 @@ Miller commands were run with pretty-print-tabular output format.     • Number formatting
    • Regular expressions
• Data transformations
+    • bar
    • cat
    • check
    • count-distinct
@@ -227,9 +228,9 @@ mlr sort -f hostname,uptime *.dat $ mlr --help Usage: mlr [I/O options] {verb} [verb-dependent options ...] {file names} Verbs: - cat check count-distinct cut filter group-by group-like having-fields head - histogram join label put regularize rename reorder sample sort stats1 stats2 - step tac tail top uniq + bar cat check count-distinct cut filter group-by group-like having-fields + head histogram join label put regularize rename reorder sample sort stats1 + stats2 step tac tail top uniq Example: mlr --csv --rs lf --fs tab cut -f hostname,uptime file1.csv file2.csv Please use "mlr -h" or "mlr --help" to show this message. Please use "mlr --version" to show the software version. @@ -629,6 +630,58 @@ name=bull,regex=^b[ou]ll$

Data transformations

+ +

bar

+ +

Cheesy bar-charting. + +

+

+
+$ mlr bar -h
+Usage: mlr bar [options]
+Replaces a numeric field with a number of asterisks, allowing for cheesy bar plots.
+These align best with --opprint or --oxtab output format.
+Options:
+-f {a,b,c}       Field names to convert to bars.
+-c {character}   Fill character: default '*'.
+-x {character}   Out-of-bounds character: default '#'.
+-b {character}   Blank character: default ' '.
+-l {lo}          Lower-limit value for min-width bar: default '0.000000'.
+-u {hi}          Upper-limit value for max-width bar: default '100.000000'.
+-w {n}           Bar-field width: default '40'.
+
+
+

+ +

+

+
+$ mlr --opprint cat data/small
+a   b   i x                   y
+pan pan 1 0.3467901443380824  0.7268028627434533
+eks pan 2 0.7586799647899636  0.5221511083334797
+wye wye 3 0.20460330576630303 0.33831852551664776
+eks wye 4 0.38139939387114097 0.13418874328430463
+wye pan 5 0.5732889198020006  0.8636244699032729
+
+
+

+ +

+

+
+$ mlr --opprint bar -l 0 -u 1 -f x,y data/small
+a   b   i x                                        y
+pan pan 1 *************                            *****************************
+eks pan 2 ******************************           ********************
+wye wye 3 ********                                 *************
+eks wye 4 ***************                          *****
+wye pan 5 **********************                   **********************************
+
+
+

+

cat