remove explicit voltage ticks
[zc] / gnuplot / template.gnuplot
index 2b56251..b472df4 100644 (file)
@@ -22,12 +22,16 @@ set key outside tmargin center
 
 set format x ""
 #set format y "%.2f"
-set yrange [ -0.1 : 0.1 ]
+set yrange [ -0.2 : 0.2 ]
 
 #set arrow 1 from first,3 to last,3 nohead linestyle rgb "#ff0000"
 
 #set multiplot
-set multiplot layout 3,1
+if ( voltage ) {
+       set multiplot layout 4,1
+} else {
+       set multiplot layout 3,1
+}
 
 set lmargin at screen 0.125
 
@@ -37,7 +41,7 @@ set linetype 99 lc 'red'
 #plot "axes.txt" using 1:2 with lines title "X angle", "" using 1:(3) with dots notitle, "" using 1:(-3) with dots notitle
 
 set ylabel "X degrees"
-plot "axes.txt" using 1:2:(abs($2) < 3 ? 1: 99) with lines lc variable notitle
+plot "axes.txt" using 1:2:(abs($2) < 0.2 ? 1: 99) with lines lc variable notitle
 # http://gnuplot-surprising.blogspot.com/2011/09/gnuplot-background-image.html
 #'/home/dpavlin/zc/www/logo-color.png' binary filetype=png origin=(0,0)  dx=0.5 dy=0.5 with rgbimage notitle
 
@@ -47,16 +51,28 @@ plot "axes.txt" using 1:2:(abs($2) < 3 ? 1: 99) with lines lc variable notitle
 set tmargin 0
 
 set ylabel "Y degrees"
-plot "axes.txt" using 1:3:(abs($3) < 3 ? 2: 99) with lines lc variable notitle
+plot "axes.txt" using 1:3:(abs($3) < 0.2 ? 2: 99) with lines lc variable notitle
 #, "" using 1:(3) with dots notitle, "" using 1:(-3) with dots notitle
 
 set tmargin 0
 
-set xlabel "time"
-set format x "%H:%M\n%d.%m."
+if ( ! voltage ) {
+       set xlabel "time"
+       set format x "%H:%M\n%d.%m."
+}
 
 set ylabel "celsius"
 set yrange [ * : * ]
 
 plot "axes.txt" using 1:4 with lines lc 'blue' notitle
 
+if ( voltage ) {
+       set xlabel "time"
+       set format x "%H:%M\n%d.%m."
+
+       set ylabel "V"
+       #set ytics 0.1 
+
+       plot "axes.txt" using 1:5 with dots lc 'red' notitle
+
+}