#!/usr/local/bin/gnuplot -persist # set terminal canvas rounded size 600,400 enhanced fsize 10 lw 1.6 fontscale 1 name "bins_1" jsdir "." # set output 'bins.1.js' set style fill solid 0.50 noborder set grid nopolar set grid noxtics nomxtics ytics nomytics noztics nomztics nortics nomrtics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault lt 0 linecolor 0 linewidth 0.500, lt 0 linecolor 0 linewidth 0.500 set style data lines set xtics border in scale 1,0.5 nomirror norotate autojustify set xtics norangelimit 1 set title "Comparison of a binned histogram and\na kernel density model of the same data" set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ 0.00000 : 5.50000 ] noreverse nowriteback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set jitter overlap 1 spread 0.5 wrap 0 set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault ## Last datafile plotted: "$DATA" plot $DATA using 1 bins=20 with boxes title '20 bins', '' using 1:(1) smooth kdensity bandwidth .5 lw 2 title 'smooth kdensity', '' using 1:(.9) with impulse lc "black" title 'jittered data'