forked from glamp/bashplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.sh
More file actions
executable file
·34 lines (24 loc) · 856 Bytes
/
sample.sh
File metadata and controls
executable file
·34 lines (24 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
dir=$(dirname "$0")
if [ ! -d "${dir}/data" ]; then
echo 'downloading data'
"${dir}/downloaddata.sh"
fi
echo 'plotting coordinates'
scatter --file "${dir}/data/texas.txt"
echo 'with x and y coords'
scatter -x "${dir}/data/x_test.txt" -y "${dir}/data/y_test.txt"
echo 'plotting a histogram'
hist --file "${dir}/data/exp.txt"
echo 'with colors'
hist --file "${dir}/data/exp.txt" --colour blue
echo 'changing the shape of the point'
hist --file "${dir}/data/exp.txt" --pch .
echo 'adding x-labels'
hist --file "${dir}/data/exp.txt" --pch . --xlab
#echo 'using stdin'
#curl -sL https://dl.dropbox.com/u/49171662/example.txt | hist
#echo 'getting data from a webpage'
#curl -s 'http://www.baseball-reference.com' |
#grep -o -E '[$][0-9]+' | grep -o -E '[0-9]+' |
#hist -b 20 -t 'Baseball Payrolls' --height 20 --pch '*'