Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://gnuplot.sourceforge.net/demo/smooth.html
- # http://gnuplot-surprising.blogspot.com/2011/09/statistic-analysis-and-histogram.html
- reset
- n=20 #number of intervals
- max=200. #max value
- min=0. #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 "block_creation.txt" u (hist($2,width)):(1.0) smooth freq w boxes lc rgb"green" notitle
- # https://stackoverflow.com/questions/2471884/histogram-using-gnuplot
- binwidth=20
- bin(x,width)=width*floor(x/width) + binwidth/2.0
- plot 'block_creation.txt' using (bin($2,binwidth)):(1.0) smooth freq with boxes
- plot 'block_creation.txt' using 2:(1.0) smooth kdensity bandwidth 10 with lines
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement