Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1420

Re: Histogram for irregular data

Path csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Histogram for irregular data
Followup-To comp.graphics.apps.gnuplot
Date Wed, 17 Oct 2012 23:24:59 -0700
Organization gnuplot development team
Lines 41
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>
Reply-To sfeam@users.sourceforge.net
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
Injection-Date Thu, 18 Oct 2012 06:25:01 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="de68407e1e0278021e2f738a9cf7b10c"; logging-data="29269"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ytFysyQNQlN8hEqxhHc04"
User-Agent KNode/4.4.9
Cancel-Lock sha1:YDdlp9HCQqd6DlL8u7l0FRyObxA=
Xref csiph.com comp.graphics.apps.gnuplot:1420

Followups directed to: comp.graphics.apps.gnuplot

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar


Thread

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