|
From: walter h. <wh...@bf...> - 2011-11-15 16:13:54
|
Am 15.11.2011 17:08, schrieb Thomas Sefzick: > David Lindelöf <lindelof <at> ieee.org> writes: > >> I would like to plot the distribution of a variable and I follow the >> directions given in the "Gnuplot in Action" book: >> >> I define a binning function: >> >> bin(x,s) = s*int(x/s) >> >> And then I use the plot command: >> >> plot './data.dat' u (bin($2, 0.2)):(1) smooth frequency >> >> However, the 'data.dat' file has a number of discontinuities in it >> (i.e. blank lines). This causes the output to show several sets of >> histograms, one for each continuous set of data. >> >> Is there any workaround for this? I would like the histogram to show >> the distribution in the whole file, and to ignore discontinuities. > > maybe use an external program to omit the blank lines: > > plot '< awk "{if (NF) print}" ./data.dat' u (bin($2, 0.2)):(1) smooth frequency > > "awk" should be installed on every unix system, for windows systems google > for 'awk windows'. > > plot '< grep -v ^$ ./data.dat' #seems more easy just my 2 cents, re, wh |