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


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

Histogram for irregular data

Newsgroups comp.graphics.apps.gnuplot
Date 2012-10-16 23:38 -0700
Message-ID <d9ed0216-4304-4121-9baf-cdb636d4d579@googlegroups.com> (permalink)
Subject Histogram for irregular data
From schickb@gmail.com

Show all headers | View raw


I'd like to create a histogram for data with "unknown" numbers of entires for each box. Further, I'd like to be able to specify the target box using the first column of data. For example the original data might look like:

WA 1
IL 2
OH 3
WA 2
WA 1
OH 1

The resulting histogram should have 3 boxes with x labels of: WA, IL, OH. WA would be a box with 3 segments (1, 2, 1), IL a box with 1 segment (2), and OH a box with 2 segments (3, 1). 

Is this possible out of the box with gnuplot? If not, I could post process the data into a format like:

WA 1 2 1
OH 3 1 0
IL 2 0 0 

But that's a bit ugly since I'll have to process the entire data file before writing a single line since the number of entires for a box is unknown to start with.

Back to comp.graphics.apps.gnuplot | Previous | NextNext 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