plotpipe: 3 columns = x,y,color. Color must be numeric.
This commit is contained in:
parent
9d500db854
commit
cbaa61fd78
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/perl
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
: <<=cut
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
@ -63,4 +60,16 @@ B<gnuplot>
|
||||||
|
|
||||||
=cut
|
=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;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
: <<=cut
|
: <<=cut
|
||||||
=encoding utf8
|
=encoding utf8
|
||||||
|
|
4
vid/vid
4
vid/vid
|
@ -33,7 +33,7 @@ Play videos matching B<Documentary> but not B<BBC>:
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
Copyright (C) 2018 Ole Tange,
|
Copyright (C) 2018-2019 Ole Tange,
|
||||||
http://ole.tange.dk and Free Software Foundation, Inc.
|
http://ole.tange.dk and Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ find_find_vidlist() {
|
||||||
echo "$1"/.vidlist
|
echo "$1"/.vidlist
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
if [ "/" == $(readlink -f "$dir") ]; then
|
if [ "/" == $(readlink -f "$dir") ] ; then
|
||||||
echo ./.vidlist
|
echo ./.vidlist
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue