Re: Graphiques

Top Page

Reply to this message
Author: Edgar Bonet
Date:  
To: Liste Guilde
Subject: Re: Graphiques
Le mercredi 23 août, Frédéric a écrit :
> Je voudrais faire des graphes de données temporelles, un peu comme munin,
> mais sans la contrainte temps réel.


En pipant sur gnuplot ?

8<------------------------------------------------------------------
cat > usd-price << EOF
# date     USD/EUR (x-rates.com)
2006-08-01 1.2778
2006-08-02 1.2798
2006-08-03 1.2779
2006-08-04 1.2894
2006-08-07 1.2867
2006-08-08 1.2839
2006-08-09 1.2888
2006-08-10 1.2765
2006-08-11 1.2757
2006-08-14 1.2735
2006-08-15 1.2788
2006-08-16 1.2864
2006-08-17 1.287
2006-08-18 1.281
2006-08-21 1.2914
2006-08-22 1.2804
EOF


gnuplot

help time/date
help set xdata
help set timefmt

set xdata time
set timefmt "%Y-%m-%d"
set format x "%d/%m"
set xlabel "date"
set ylabel "USD"
unset key
set grid
set style data linespoints
plot 'usd-price' using 1:2
8<------------------------------------------------------------------

Edgar.