From 456fbaf05197da8a192851081a38ba2af9d9869d Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 30 Jan 2024 14:03:20 +0100 Subject: [PATCH] continue tweaking gnuplot terminal output --- scratchpad/plotting/gnuplot/term2.gp | 4 ++++ scratchpad/plotting/gnuplot/term3.gp | 27 ++++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/scratchpad/plotting/gnuplot/term2.gp b/scratchpad/plotting/gnuplot/term2.gp index 28e5f10..7b44713 100644 --- a/scratchpad/plotting/gnuplot/term2.gp +++ b/scratchpad/plotting/gnuplot/term2.gp @@ -19,3 +19,7 @@ set xlabel "x" set ylabel "Frequency" #count and plot plot "data.dat" u (hist($1,width)):(1.0) smooth freq w boxes lc rgb"green" notitle + +stats 'data.dat' +show variables all + diff --git a/scratchpad/plotting/gnuplot/term3.gp b/scratchpad/plotting/gnuplot/term3.gp index e0315e4..8e5885f 100644 --- a/scratchpad/plotting/gnuplot/term3.gp +++ b/scratchpad/plotting/gnuplot/term3.gp @@ -1,13 +1,26 @@ reset -set terminal dumb size 80, 25 -n=100 #number of intervals -max=3. #max value -min=-3. #min value +stats 'data.dat' +# show variables all +# STATS_min +# STATS_max + +set terminal dumb size 100, 25 +n=1000 #number of intervals +max=STATS_max #max value +min=STATS_min #min value width=(max-min)/n #interval width -#function used to map a value to the intervals hist(x,width)=width*floor(x/width)+width/2.0 -set boxwidth width*0.9 - +set xrange [min:max] +set yrange [0:] +#to put an empty boundary around the +#data inside an autoscaled graph. +# set offset graph 0.05,0.05,0.05,0.0 +# set xtics min,(max-min)/5,max +# set boxwidth width*0.9 +# set tics out nomirror +set xlabel "x" +set ylabel "Frequency" #count and plot plot "data.dat" u (hist($1,width)):(1.0) smooth freq w boxes lc rgb"green" notitle +