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


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

Re: Stacked boxes

Date 2011-04-14 13:03 -0400
From Mike Rhodes <M8R-1cd059@mailinator.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Stacked boxes
References (4 earlier) <4da3a149$0$22212$c3e8da3$a8a65a91@news.astraweb.com> <4da6025a$0$5766$c3e8da3$e408f015@news.astraweb.com> <io56s1$err$1@dont-email.me> <io5e4q$gd2$1@dont-email.me> <io75h0$j67$1@dont-email.me>
Message-ID <4da728f9$0$2446$c3e8da3$9b4ff22a@news.astraweb.com> (permalink)
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


On 4/14/2011 11:57 AM, sfeam wrote:
> James Waldby wrote:
>
>> The usual method for processing such data is to use a heap [see eg
>> <http://en.wikipedia.org/wiki/Heap_%28data_structure%29> ].  One
>> could dump all of the item start times and all of the item end
>> times into a big heap, and then plot the heap min until heap is
>> empty.  A more complicated method (idea as sketched below, might
>> need a fix or two) would use a small heap, of size proportional
>> to maximum box stack depth:
>>
>> Suppose data lines are sorted by increasing time and each line
>> contains {.t, .f, .d} fields for {time, flow, duration}, and
>> heap entries contain {.t, .f} fields for {time, flow}.
>>
>> (1) If heap is empty and no more items, quit.
>> (2) If heap is empty, put next item x on heap as follows:
>>       Make an 'up' entry, {x.t, x.f} and a 'down' entry
>>       at {x.t+x.d, -x.f} and advance next.
>> (3) Get min item x from heap.  If next item y has y.t <= x.t,
>>     add y up and down to heap (ie, {y.t, y.f} and {y.t+y.d, -y.f})
>>     and advance next.
>> (4) Add x.f to current flow f and output (x.t, f) for plotting
>>     (Adapt appropriately if making filled area boxes as in
>>      suggestion below.  Box width equals time difference between
>>      previous and current heap min item, or between current and
>>      next, depending on type of plot)
>> (5) Go to 1.
> 
> Thanks.  Some variant of that approach does seem likely to work.
> 
> Can anyone offer pointers to typical data sets or examples of this
> type of presentation?  What is such a plot style called?
> Would there typically be any information to present beyond the
> 3 quantities  start/stop/flow?    I imagine that each entry also  
> could have at least one "type" or "class" property that might be
> encoded by color.  Is that done?
>

I'm happy to help on the data set side of things. For ideas about how
the data might be presented, the screenshots from NfSen might help:

http://nfsen.sourceforge.net/#mozTocId301830

Mike

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-11 13:07 -0400
  Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-11 10:26 -0700
    Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-11 14:12 -0400
      Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-11 17:41 -0700
        Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-11 20:48 -0400
          Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-13 16:06 -0400
            Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-13 15:07 -0700
              Re: Stacked boxes James Waldby <not@valid.invalid> - 2011-04-14 00:12 +0000
                Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-14 08:57 -0700
                Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-14 13:03 -0400
      Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-14 14:00 -0700
        Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-14 17:29 -0400
          Re: Stacked boxes sfeam <sfeam@users.sourceforge.net> - 2011-04-14 15:59 -0700
            Re: Stacked boxes Mike Rhodes <M8R-1cd059@mailinator.com> - 2011-04-14 21:56 -0400

csiph-web