Saturday, October 10, 2009

gnuplot

It's a load of work:
Jesli chodzi o przedstawienie pracy - prosze przygotowac normalna dokumentacje projektowa, tj. koncepcja (schematy ideowe z komentarzem), projekt (diagramy uml) oraz opis implementacji (wzsystkie moduly/klasy opisane i skomentowane). Do tego bedzie potrzebna instrukcja uzytkownika (jak uruchomic/zmodyfikowac system). Trzeba bedzie rozszerzyc funkcjonalnosc zwiazana z wykresami (box and whiskers) udokumentowac to co jest i w koncu przeprowadzic merge do trunka.


I started from gnuplot - docs - demo script.
Five columns of data are required.
It means that computing must be performed before.

Sample data:
1 1.5 2 2.4 4 6.
2 1.5 3 3.5 4 5.5
3 4.5 5 5.5 6 6.5
4 3.7 4.5 5.0 5.5 6.1
5 3.1 3.5 4.2 5 6.1
6 1 4 5.0 6 9
7 4 4 4.8 6 6.1
8 4 5 5.1 6 6.1
9 1.5 2 2.4 3 3.5
10 2.7 3 3.5 4 4.3


Sample code:
set terminal png
set output "gnuplot_candle.png"

set boxwidth 0.2 absolute
set title "box-and-whisker with median bar and whiskerbars"
set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set xrange [ 0.00000 : 11.0000 ] noreverse nowriteback
set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:11.0000] )
set yrange [ 0.00000 : 10.0000 ] noreverse nowriteback
set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] )
set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles' whiskerbars, '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle


Exmplanation of some settings:
lt - linetype
lw - linewidth
noreverse / nowriteback (xrange)
using (datastrings)

Sample output:

0 komentarze:

Post a Comment