Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1976
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: histogram : without using commanade "smooth freq" |
| Followup-To | comp.graphics.apps.gnuplot |
| Date | 2013-08-15 17:18 -0700 |
| Organization | gnuplot development team |
| Message-ID | <kujr4i$3j2$1@dont-email.me> (permalink) |
| References | (5 earlier) <kug45h$7ho$1@news.rz.uni-karlsruhe.de> <kug8pa$h17$1@dont-email.me> <kugco3$au8$1@news.rz.uni-karlsruhe.de> <kuh9hd$4pd$1@dont-email.me> <b64d6a60-bf4a-4acd-8b77-fc1d1469b1ac@googlegroups.com> |
Followups directed to: comp.graphics.apps.gnuplot
D.GH wrote:
> With the following code:
>
> set boxwidth 0.2 absolute
> set table 'out1.dat'
> plot 'mydata.dat' using ($1):(1) smooth freq w boxes
> unset table
> By this method we did not have control over the number of intervals for
> the histogram to present.
Huh?
"smooth frequency" can be used to generate a histogram of binned values,
but that is not what the command intrinsically does.
If you do not provide an explicit binning function with defined intervals,
then the data itself is the only source of x-coordinates.
You get one output entry for each unique input x-coord.
"help smooth freq" says:
The `frequency` option makes the data monotonic in x; points with the same
x-value are replaced by a single point having the summed y-values.
To plot a histogram of the number of data values in equal size bins,
set the y-value to 1.0 so that the sum is a count of occurances in that bin:
Example:
binwidth = <something> # set width of x values in each bin
bin(val) = binwidth * floor(val/binwidth)
plot "datafile" using (bin(column(1))):(1.0) smooth frequency
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
histogram : without using commanade "smooth freq" "D.GH" <dariush.ghorbanzadeh@gmail.com> - 2013-08-11 16:29 -0700
Re: histogram : without using commanade "smooth freq" Karl <mail.kfr@gmx.net> - 2013-08-12 08:10 +0200
Re: histogram : without using commanade "smooth freq" "D.GH" <dariush.ghorbanzadeh@gmail.com> - 2013-08-12 15:35 -0700
Re: histogram : without using commanade "smooth freq" Karl <ratzsch@polymer.uka.de> - 2013-08-13 09:37 +0200
Re: histogram : without using commanade "smooth freq" "D.GH" <dariush.ghorbanzadeh@gmail.com> - 2013-08-13 06:45 -0700
Re: histogram : without using commanade "smooth freq" "D.GH" <dariush.ghorbanzadeh@gmail.com> - 2013-08-13 10:48 -0700
Re: histogram : without using commanade "smooth freq" Karl <mail.kfr@gmx.net> - 2013-08-14 16:27 +0200
Re: histogram : without using commanade "smooth freq" sfeam <sfeam@users.sourceforge.net> - 2013-08-14 08:46 -0700
Re: histogram : without using commanade "smooth freq" Karl <mail.kfr@gmx.net> - 2013-08-14 18:48 +0200
Re: histogram : without using commanade "smooth freq" Karl <mail.kfr@gmx.net> - 2013-08-14 18:54 +0200
Re: histogram : without using commanade "smooth freq" sfeam <sfeam@users.sourceforge.net> - 2013-08-14 18:05 -0700
Re: histogram : without using commanade "smooth freq" "D.GH" <dariush.ghorbanzadeh@gmail.com> - 2013-08-15 16:00 -0700
Re: histogram : without using commanade "smooth freq" sfeam <sfeam@users.sourceforge.net> - 2013-08-15 17:18 -0700
Re: histogram : without using commanade "smooth freq" Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2013-08-13 22:35 +0200
csiph-web