squiggle.c

Self-contained Monte Carlo estimation in C99
Log | Files | Refs | README

commit af7dc3732768e7a404640c09a964be8e556299e3
parent ec9e2e89e08430e519dde882d30ba8a40e9da6a0
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Tue, 30 Jan 2024 13:54:01 +0100

some modifications

Diffstat:
Rscratchpad/plotting/gnuplot/command-terminal.gp -> scratchpad/plotting/gnuplot/term1.gp | 0
Ascratchpad/plotting/gnuplot/term2.gp | 21+++++++++++++++++++++
Ascratchpad/plotting/gnuplot/term3.gp | 13+++++++++++++
3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/scratchpad/plotting/gnuplot/command-terminal.gp b/scratchpad/plotting/gnuplot/term1.gp diff --git a/scratchpad/plotting/gnuplot/term2.gp b/scratchpad/plotting/gnuplot/term2.gp @@ -0,0 +1,21 @@ +reset +set terminal dumb size 80, 25 +n=100 #number of intervals +max=5. #max value +min=-5. #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 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 style fill solid 0.5 #fillstyle +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 diff --git a/scratchpad/plotting/gnuplot/term3.gp b/scratchpad/plotting/gnuplot/term3.gp @@ -0,0 +1,13 @@ +reset +set terminal dumb size 80, 25 + +n=100 #number of intervals +max=3. #max value +min=-3. #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 + +#count and plot +plot "data.dat" u (hist($1,width)):(1.0) smooth freq w boxes lc rgb"green" notitle