From ae8c60eb03dee082b77eeef6853fd45648342666 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 15 Dec 2020 16:33:38 +0100 Subject: [PATCH] increase default yrange to 0.2 --- gnuplot/template.gnuplot | 6 +++--- www/cgi-bin/template.cgi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gnuplot/template.gnuplot b/gnuplot/template.gnuplot index 8235f47..0a8e7c6 100644 --- a/gnuplot/template.gnuplot +++ b/gnuplot/template.gnuplot @@ -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 diff --git a/www/cgi-bin/template.cgi b/www/cgi-bin/template.cgi index d1cc6e5..5d157c3 100755 --- a/www/cgi-bin/template.cgi +++ b/www/cgi-bin/template.cgi @@ -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.$$ -- 2.20.1