increase default yrange to 0.2
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 15 Dec 2020 15:33:38 +0000 (16:33 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 15 Dec 2020 15:33:38 +0000 (16:33 +0100)
gnuplot/template.gnuplot
www/cgi-bin/template.cgi

index 8235f47..0a8e7c6 100644 (file)
@@ -22,7 +22,7 @@ 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"
 
@@ -37,7 +37,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) < 0.1 ? 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,7 +47,7 @@ plot "axes.txt" using 1:2:(abs($2) < 0.1 ? 1: 99) with lines lc variable notitle
 set tmargin 0
 
 set ylabel "Y degrees"
-plot "axes.txt" using 1:3:(abs($3) < 0.1 ? 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
index d1cc6e5..5d157c3 100755 (executable)
@@ -16,12 +16,12 @@ test -z "$QUERY_STRING" && QUERY_STRING='.'
 gnuplot_sed='';
 
 yrange=$( echo $QUERY_STRING | grep '^yrange=[0-9]*\.[0-9]*$' | cut -d= -f2 )
-test -z "$yrange" && yrange=0.1
+test -z "$yrange" && yrange=0.2
 
 set > /dev/shm/$pn.env
 
 cat $dir/template.sql | sed -e "s/2008050087/$pn/" -e "s/x_axis_angle/x_axis_angle + $offset_x/" -e "s/y_axis_angle/y_axis_angle + $offset_y/" | psql --username=dpavlin -A -F "," -t zc > /dev/shm/$pn.txt
-cat $dir/template.gnuplot | sed -e "s,axes.txt,/dev/shm/$pn.txt," -e "s,^set terminal.*$,set terminal svg," -e "s,^set output.*$,set output," -e "s,-0.1 : 0.1,-$yrange : $yrange," > /dev/shm/$pn.gnuplot
+cat $dir/template.gnuplot | sed -e "s,axes.txt,/dev/shm/$pn.txt," -e "s,^set terminal.*$,set terminal svg," -e "s,^set output.*$,set output," -e "s,-0.2 : 0.2,-$yrange : $yrange," > /dev/shm/$pn.gnuplot
 gnuplot /dev/shm/$pn.gnuplot
 
 #rm /dev/shm/axes.txt.$$ /dev/shm/axes.gnuplot.$$