Commit cbaa61fd authored by Ole Tange's avatar Ole Tange

plotpipe: 3 columns = x,y,color. Color must be numeric.

parent 9d500db8
#!/bin/bash
#!/usr/bin/perl
#!/bin/bash
: <<=cut
=pod
=head1 NAME
......@@ -63,4 +60,16 @@ B<gnuplot>
=cut
gnuplot -p -e 'plot "/dev/stdin"'
$line1 = <>;
@col = split /\s+/, $line1;
if($#col == 1) {
# 2 col
open GNUPLOT,"|-", q(gnuplot -p -e 'plot "/dev/stdin"') or die;
} elsif($#col == 2) {
# 3 col (3rd = color)
open GNUPLOT,"|-", q(gnuplot -p -e 'plot "/dev/stdin" using 1:2:3 with points palette') or die;
} else {
die "$#col,@col,$line1";
}
print GNUPLOT $line1, <>;
close GNUPLOT;
#!/bin/bash
#!/usr/bin/env bash
: <<=cut
=encoding utf8
......
......@@ -33,7 +33,7 @@ Play videos matching B<Documentary> but not B<BBC>:
=head1 AUTHOR
Copyright (C) 2018 Ole Tange,
Copyright (C) 2018-2019 Ole Tange,
http://ole.tange.dk and Free Software Foundation, Inc.
......@@ -76,7 +76,7 @@ find_find_vidlist() {
echo "$1"/.vidlist
return 0
else
if [ "/" == $(readlink -f "$dir") ]; then
if [ "/" == $(readlink -f "$dir") ] ; then
echo ./.vidlist
return 0
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment