timeplot 1.0.25 → 1.0.26
raw patch · 5 files changed
+8/−2 lines, 5 files
Files
- Tools/TimePlot.hs +3/−1
- Tools/TimePlot/Conf.hs +2/−0
- Tools/TimePlot/Plots.hs +1/−0
- Tools/TimePlot/Types.hs +1/−0
- timeplot.cabal +1/−1
Tools/TimePlot.hs view
@@ -180,6 +180,8 @@ " 'what was the average number of active events or impulses in that", " interval'. When used inside 'within', the histogram is a stacked one,", " with one vertical bar per subtrack in each bin.",+ " 'count N' is same as 'acount N' but scaled by the bin size, i.e. rather than ",+ " activity rate per time unit, it's activity count per time bin. ", " 'apercent N B' is for activity percentages of a basis: like 'acount N',", " but instead of X you get 100*X/B", " 'afreq N' is for activity frequencies: it's like acount, but relative",@@ -240,7 +242,7 @@ ; OutPS -> PS ; OutSVG -> SVG }- let render r w h f = renderableToFile (fo_size .~ (w, h) $ fo_format .~ format $ def) r f+ let render r w h f = renderableToFile (fo_size .~ (w, h) $ fo_format .~ format $ def) f r case conf of ConcreteConf { parseTime=parseTime, inFile=inFile, chartKindF=chartKindF,
Tools/TimePlot/Conf.hs view
@@ -106,6 +106,8 @@ parseKind :: [String] -> ChartKind LocalTime parseKind ["acount", n ] = KindACount {binSize=read n} parseKind ("acount":_) = error "acount requires a single numeric argument, bin size, e.g.: -dk 'acount 1'" + parseKind ["count", n ] = KindCount {binSize=read n} + parseKind ("count":_) = error "count requires a single numeric argument, bin size, e.g.: -dk 'count 1'" parseKind ["apercent",n,b] = KindAPercent {binSize=read n,baseCount=read b} parseKind ("apercent":_) = error "apercent requires two numeric arguments: bin size and base value, e.g.: -dk 'apercent 1 480'" parseKind ["afreq", n ] = KindAFreq {binSize=read n}
Tools/TimePlot/Plots.hs view
@@ -27,6 +27,7 @@ initGen :: ChartKind LocalTime -> PlotGen initGen (KindACount bs) = genActivity (\sns n -> n) bs +initGen (KindCount bs) = genActivity (\sns n -> n*toSeconds bs (undefined::LocalTime)) bs initGen (KindAPercent bs b) = genActivity (\sns n -> 100*n/b) bs initGen (KindAFreq bs) = genActivity (\sns n -> if n == 0 then 0 else (n / sum (M.elems sns))) bs initGen (KindFreq bs k) = genAtoms atoms2freqs bs k
Tools/TimePlot/Types.hs view
@@ -95,6 +95,7 @@ | KindDuration { subKind :: ChartKind t, dropSubtrack :: Bool } | KindWithin { mapName :: S.ByteString -> S.ByteString, subKind :: ChartKind t } | KindACount { binSize :: Delta t } + | KindCount { binSize :: Delta t } | KindAPercent { binSize :: Delta t, baseCount :: Double } | KindAFreq { binSize :: Delta t } | KindQuantile { binSize :: Delta t, quantiles :: [Double] }
timeplot.cabal view
@@ -1,5 +1,5 @@ name: timeplot-version: 1.0.25+version: 1.0.26 cabal-version: >=1.6 build-type: Simple license: BSD3