Savepoint plotting

This commit is contained in:
NunoSempere 2024-01-30 14:52:25 +01:00
parent 456fbaf051
commit 7bc29b9e3d
4 changed files with 67 additions and 18 deletions

View File

@ -1,5 +1,7 @@
reset reset
set terminal dumb size 80, 25 set terminal dumb size 80, 25
max=3
min=-3
n=100 #number of intervals n=100 #number of intervals
width=(max-min)/n #interval width width=(max-min)/n #interval width
#function used to map a value to the intervals #function used to map a value to the intervals

View File

@ -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

View File

@ -1,26 +1,26 @@
reset reset
stats 'data.dat' stats 'data.dat' nooutput
# show variables all # show variables all
# STATS_min max=STATS_max
# STATS_max min=STATS_min
set terminal dumb size 100, 25 n=1000
n=1000 #number of intervals width=(max-min)/n
max=STATS_max #max value
min=STATS_min #min value
width=(max-min)/n #interval width
hist(x,width)=width*floor(x/width)+width/2.0 hist(x,width)=width*floor(x/width)+width/2.0
set xrange [min:max] set xrange [min:max]
set yrange [0:] 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
unset xtics
unset ytics
unset border
set xtics out nomirror norotate offset 0,0
set ytics out nomirror norotate
set ytics in nomirror norotate offset 0,0
set tics scale 0,0,0,0
set xlabel "x"
set terminal dumb size 100, 25
plot "data.dat" u (hist($1,width)):(1.0) smooth freq w boxes notitle

View File

@ -0,0 +1,26 @@
reset
stats 'data.dat' nooutput
# show variables all
max=STATS_max
min=STATS_min
n=1000
width=(max-min)/n
hist(x,width)=width*floor(x/width)+width/2.0
set xrange [min:max]
set yrange [0:]
unset xtics
unset ytics
unset border
set xtics out nomirror norotate offset 0,0
set ytics out nomirror norotate
set ytics in nomirror norotate offset 0,0
set tics scale 0,0,0,0
set xlabel "x"
set terminal dumb size 100, 25
plot 'data.dat' u (hist($1,width)):(1.0) smooth freq w boxes notitle