Quellcode durchsuchen

added gnuplot example

Martin Thoma vor 12 Jahren
Ursprung
Commit
e0e6349038

+ 13 - 0
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/

+ 8 - 8
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

+ 1 - 1
math/gnuplot/draw-csv/plot.gnuplot

@@ -1,4 +1,4 @@
 set terminal latex
 set terminal latex
 set output "plot-tmp.tex"
 set output "plot-tmp.tex"
 set datafile separator "," 
 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