ไธปใซใๆๅปใ็ฎ็ใใซ็จใใใใญใใใฎใใใฎgnuplotใณใใณใใฎใกใขใ
ใพใใใใผใฟใๆพใฃใฆใใใจใใ
#!/bin/sh
curl -s http://sx9.jp/weather/tokyo-hongo.js |
grep ' \(0\|1\), ' |
sed 's/ *data.setValue([0-9]*,//g' | sed 's/);//g' | sed 's/[ \t]//g' |
sed 's#0,.\([0-9]*\)ๆ\([0-9]*\)ๆฅ\([0-9]*\)ๆ\([0-9]*\)ๅ.*#2015/\1/\2 \3:\4 #' |
sed 's#1,\([0-9]*\)#\1@#' |
tr -d '\n' | sed 's/@/\n/g' >data
ไธใๅใใใจใใใใชใใผใฟใๅพใใใ
2015/08/28 00:21 0
2015/08/28 00:22 0
2015/08/28 00:23 0
:
ใใใใใญใใใใ
set terminal png
set output 'plot.png'
set xtics rotate by -60
set xdata time
set timefmt "%Y/%m/%d %H:%M"
set format x "%m/%d %H:%M"
set yrange [0:100]
set grid
set style fill solid border lc rgb "#00ffff"
set style line 1 lc rgb "#bbffff"
set style data filledcurves x1
plot 'data' using 1:3 smooth csplines linestyle 1 lw 3 with filledcurves
ๆฎ้ใชใ with linepoint
ใฎใจใใใ smooth csplines
ใจใใฆใ. (ใใผใฟ็นใฎใใใ ใ็ตใถ็ทใฎใชใใใใใๅคใใ)