diff --git a/math/gnuplot/draw-csv/README.md b/math/gnuplot/draw-csv/README.md new file mode 100644 index 0000000..08e0171 --- /dev/null +++ b/math/gnuplot/draw-csv/README.md @@ -0,0 +1,13 @@ +GnuPlot and CSV-Files +===================== + +Syntax: `plot 'data.csv' every::1::7 using 1:2 with boxes` + +* `data.csv`: The CSV-file +* `every::1::7`: use data from line 1 to line 7 +* `using 1:2`: use first and second column +* `with boxes`: can also be `lines` or `vectors head size 0.1,20,60 filled lc palette` + +Examples +-------- +* http://www.gnuplotting.org/tag/data/ diff --git a/math/gnuplot/draw-csv/data.csv b/math/gnuplot/draw-csv/data.csv index 2bd15a5..f0751aa 100644 --- a/math/gnuplot/draw-csv/data.csv +++ b/math/gnuplot/draw-csv/data.csv @@ -1,8 +1,8 @@ -time,frequency -1,100 -2,80 -3,10 -12,120 -4,50 -5,50 -6,50 +time,frequency,color,bla +1,100,123,0 +2,80,345,0 +3,10,231,10 +12,120,0,12 +4,50,10,15 +5,50,10,15 +6,50,10,15 diff --git a/math/gnuplot/draw-csv/plot.gnuplot b/math/gnuplot/draw-csv/plot.gnuplot index 8f71d86..33a5abc 100644 --- a/math/gnuplot/draw-csv/plot.gnuplot +++ b/math/gnuplot/draw-csv/plot.gnuplot @@ -1,4 +1,4 @@ set terminal latex set output "plot-tmp.tex" set datafile separator "," -plot 'data.csv' every::1::7 using 1:2 with lines +plot 'data.csv' every::1::7 using 1:2:3:4 with vectors head size 0.1,20,60 filled lc palette