Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: sfeam Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Stacked boxes Followup-To: comp.graphics.apps.gnuplot Date: Mon, 11 Apr 2011 17:41:12 -0700 Organization: gnuplot development team Lines: 66 Message-ID: References: <4da3355c$0$12295$c3e8da3$aae71a0a@news.astraweb.com> <4da344aa$0$5610$c3e8da3$10cdda79@news.astraweb.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: Tue, 12 Apr 2011 00:41:16 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="WEZLCPHRH3QJlZRyUKB04A"; logging-data="25666"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nT2UBbIC6kVLMIUD48VPC" User-Agent: KNode/4.4.3 Cancel-Lock: sha1:Z4zKJJahJJ0Bp1S9tHqHHMj7EV0= Xref: x330-a1.tempe.blueboxinc.net comp.graphics.apps.gnuplot:237 Mike Rhodes wrote: > On 4/11/2011 1:26 PM, sfeam wrote: >> Mike Rhodes wrote: >> >>> Hello, >>> >>> I have an issue I've been trying to use AWK to get around but I've >>> ended up here to ask about a feature implementation. >>> >>> I am trying to use boxes to plot total throughput from netflow data. >>> I like the fact that I can specify the width of the box -- I set >>> that to the duration of the flow. But my frustration comes from the >>> fact that the boxes do not stack when they overlap. Instead, they >>> overlay each other. This only allows me to graph the maximum >>> single-flow throughput, rather than total throughput at any given >>> time. Does anyone know if there are any plans for box stacking in >>> future versions of gnuplot? >> >> Is it possible that you are looking for one of the stacked histogram >> modes? E.g. plots 5-7 in >> >> http://gnuplot.sourceforge.net/demo/histograms.html > > That's not quite what I'm looking for. The variable width of the box > is a crucial piece of data in the plots I'm doing. > >> If that's not what you had in mind, could you post a link to some >> plot somewhere that is in the style you are thinking of? > > Here is a sample plot: > http://s3.amazonaws.com/3tbVapQP/box_overlay_example.png > > This is the data: > > 1302350771.016 0.003040 1.752 > 1302350788.681 0.047432 4.548 > 1302350792.845 0.032472 1.120 > 1302350792.901 0.021536 0.172 > 1302350793.217 0.023680 0.420 > 1302350800.717 0.025024 0.492 > 1302350814.777 0.001248 0.000 > 1302350814.781 0.001248 0.020 > 1302350823.701 0.019568 0.228 > 1302350830.432 0.000832 0.096 > > Notice how, in the box just after 6:30, there is one box inside > another? What I'm looking for it to do is to jump up above the > existing box, so that it shows the total throughput at that time (the > sum of the overlapped boxes) instead of just the largest box. > > Does that help? I don't think that description is entirely well-defined. What if two rectangles overlap only partially? It seems like perhaps what you need to do is to treat time as a sequence of discrete intervals (1 second?), and rather than drawing a rectangle per se, add the instantaneous flow to a running total in the appropriate bins. Then you could plot the bins in gnuplot with the style "impulses". > > Thanks, > Mike