plot-light 0.1.0.6 → 0.1.0.7
raw patch · 3 files changed
+13/−61 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- app/timeseries/Main.hs +0/−46
- plot-light.cabal +13/−13
- src/Graphics/Rendering/Plot/Light/PlotTypes/TimeSeries/Candlestick.hs +0/−2
− app/timeseries/Main.hs
@@ -1,46 +0,0 @@-{-# language OverloadedStrings #-}-module Main where--import Control.Arrow ((***), (&&&))---- import Graphics.Rendering.Plot.Light.IO.Text--- import Graphics.Rendering.Plot.Light.Internal--- -- import Graphics.Rendering.Plot.Light.Internal.Types--- import Graphics.Rendering.Plot.Light.PlotTypes.TimeSeries--- -- import Data.TimeSeries.Forex- --- import qualified Data.Attoparsec.Text as A--- import qualified Data.Text as T--- import qualified Data.Text.IO as T--- import Data.Scientific (Scientific, toRealFloat)--- import Text.Blaze.Svg.Renderer.String (renderSvg)--- import qualified Data.Colour.Names as C----fname = "data/forex"--xPlot = 400-yPlot = 300-fnameOut = "data/forex_plot.svg"---- figData = mkFigureData 10 10 xPlot yPlot--main = print "hello!"---- main = do--- d <- T.readFile fname--- let pd = A.parseOnly parseFxDataset d--- case pd of Left e -> error e--- Right datarows -> do--- let--- dat = tspToTuple rateHigh <$> reverse datarows--- (dat', fdat) = mkFigureData xPlot yPlot toFloat dat--- svg_t = renderSvg $ figure fdat--- (polyline dat' 0.5 C.red)--- T.writeFile fnameOut $ T.pack svg_t---- toFloat :: Scientific -> Float--- toFloat x = toRealFloat x :: Float--
plot-light.cabal view
@@ -1,5 +1,5 @@ name: plot-light-version: 0.1.0.6+version: 0.1.0.7 synopsis: A lightweight plotting library, exporting to SVG description: A lightweight plotting library, exporting to SVG homepage: https://github.com/ocramz/plot-light@@ -44,18 +44,18 @@ -- , QuickCheck -executable plot-light- default-language: Haskell2010- ghc-options: -threaded -rtsopts -with-rtsopts=-N- hs-source-dirs: app/timeseries- main-is: Main.hs- build-depends: base- , plot-light- -- , attoparsec- -- , text- -- , colour- -- , blaze-svg- -- , scientific+-- executable plot-light+-- default-language: Haskell2010+-- ghc-options: -threaded -rtsopts -with-rtsopts=-N+-- hs-source-dirs: app/timeseries+-- main-is: Main.hs+-- build-depends: base+-- , plot-light+-- -- , attoparsec+-- -- , text+-- -- , colour+-- -- , blaze-svg+-- -- , scientific test-suite spec default-language: Haskell2010
src/Graphics/Rendering/Plot/Light/PlotTypes/TimeSeries/Candlestick.hs view
@@ -1,5 +1,3 @@ module Graphics.Rendering.Plot.Light.PlotTypes.TimeSeries.Candlestick where - import Graphics.Rendering.Plot.Light.Internal-import Graphics.Rendering.Plot.Light.Internal.Types