Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1414
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2012-10-17 09:12 -0700 |
| References | <d9ed0216-4304-4121-9baf-cdb636d4d579@googlegroups.com> <507E7989.1050103@gmx.eu> |
| Message-ID | <c8a8914e-5260-46f6-bc5e-d1399bc2110e@googlegroups.com> (permalink) |
| Subject | Re: Histogram for irregular data |
| From | schickb@gmail.com |
On Wednesday, October 17, 2012 2:25:25 AM UTC-7, Hermann Peifer wrote:
>
> With a reasonable data file size, I would pre-process the data on the
> fly, perhaps in this way:
>
> plot "<( awk '{a[$1]=a[$1] FS $2}END{for (i in a) print i, a[i]}' file
> )" using ...
>
> The above AWK one-liner prints your sample data like this:
>
> IL 2
> OH 3 1
> WA 1 2 1
>
Thanks. That is what I was trying to avoid... but I guess its workable. What would the rest of that plot line look like for an unknown/variable number of columns? Or should I use the zero fill trick and count the number of column during pre-processing?
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Histogram for irregular data schickb@gmail.com - 2012-10-16 23:38 -0700
Re: Histogram for irregular data Hermann Peifer <peifer@gmx.eu> - 2012-10-17 06:25 -0300
Re: Histogram for irregular data schickb@gmail.com - 2012-10-17 09:12 -0700
Re: Histogram for irregular data Hermann Peifer <peifer@gmx.eu> - 2012-10-17 21:45 -0300
Re: Histogram for irregular data schickb@gmail.com - 2012-10-17 18:01 -0700
Re: Histogram for irregular data sfeam <sfeam@users.sourceforge.net> - 2012-10-17 23:24 -0700
Re: Histogram for irregular data schickb@gmail.com - 2012-10-19 09:05 -0700
csiph-web