2024-01-30 12:46:52 +00:00
|
|
|
reset
|
2024-01-30 12:54:01 +00:00
|
|
|
|
2024-01-30 13:03:20 +00:00
|
|
|
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
|
2024-01-30 12:46:52 +00:00
|
|
|
width=(max-min)/n #interval width
|
|
|
|
hist(x,width)=width*floor(x/width)+width/2.0
|
2024-01-30 13:03:20 +00:00
|
|
|
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"
|
2024-01-30 12:46:52 +00:00
|
|
|
#count and plot
|
|
|
|
plot "data.dat" u (hist($1,width)):(1.0) smooth freq w boxes lc rgb"green" notitle
|
2024-01-30 13:03:20 +00:00
|
|
|
|