Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1420
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Histogram for irregular data |
| Followup-To | comp.graphics.apps.gnuplot |
| Date | 2012-10-17 23:24 -0700 |
| Organization | gnuplot development team |
| Message-ID | <k5o7bt$sil$1@dont-email.me> (permalink) |
| References | <d9ed0216-4304-4121-9baf-cdb636d4d579@googlegroups.com> <507E7989.1050103@gmx.eu> <c8a8914e-5260-46f6-bc5e-d1399bc2110e@googlegroups.com> <k5njes$5k6$1@news.albasani.net> <48aec7c8-810e-4c17-be5c-b084846981e0@googlegroups.com> |
Followups directed to: comp.graphics.apps.gnuplot
schickb@gmail.com wrote:
>
>> > 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?
>>
>> Sorry, but I don't understand your questions. I hope that someone
>> else
>>
>
> What is the plot line to create a histogram for the data below? I'm
> actually stuck on 4.2, which I believe doesn't support 'for' loops,
> but I'd find a way to upgrade if there is a simple solution in 4.6.
>
> IL 2
> OH 3 1
> WA 1 2 1
You need to zero-fill.
For data that looks like
IL 2 0 0 0
OH 3 1 0 0
WA 1 2 1 0
The plot commands would be something like this
(tested with version 4.6.1):
set style histogram rowstacked
set style data histogram
set style fill solid border -1
unset key
N = columns
plot "datafile" using 2:xtic(1), for [i=3:N] "" using i
If you set N larger than the actual number of columns you
will get warnings like this:
warning: Skipping data file with no valid points
but the columns that do exist should be plotted correctly.
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