gnuplot 0.4 → 0.4.0.1
raw patch · 5 files changed
+84/−2 lines, 5 filesdep +filepathPVP ok
version bump matches the API change (PVP)
Dependencies added: filepath
API changes (from Hackage documentation)
Files
- data/runtime.data +52/−0
- gnuplot.cabal +6/−2
- src/Demo.hs +22/−0
- src/Graphics/Gnuplot/Plot/TwoDimensional.hs +1/−0
- src/Graphics/Gnuplot/Private/Graph2D.hs +3/−0
+ data/runtime.data view
@@ -0,0 +1,52 @@+#description: runtimes over input size+1 6.355182636689504e-5+100 1.0948364162371856e-2+199 2.2883437011933076e-2+298 3.6984818514001545e-2+397 5.278430392525412e-2+496 6.556876441607734e-2+595 8.094012753488622e-2+694 9.764933499422945e-2+793 0.11376420890800729+892 0.1303682446197088+991 0.1494559487429532+1090 0.16847618759261968+1189 0.1870789716535227+1288 0.20706133347400274+1387 0.22577923641544467+1486 0.24842725050880543+1585 0.2687356359522487+1684 0.29853175822408823+1783 0.30569358846083045+1882 0.34811570598277525+1981 0.37377121156830634+2080 0.3976917936986544+2179 0.4248938615564355+2278 0.4563135662584595+2377 0.4827751635322885+2476 0.5078150705665049+2575 0.5308599307954707+2674 0.5731755964461464+2773 0.5953289658030824+2872 0.6123024067073677+2971 0.5644368814660525+3070 0.6892736894713817+3169 0.7198984790477585+3268 0.75820146082337+3367 0.7922666002868061+3466 0.8332174605827827+3565 0.8727248373231685+3664 0.9070082204645331+3763 0.941051246582755+3862 0.9763012261824174+3961 1.0146614115691386+4060 1.053540654379474+4159 1.1035736989768552+4258 1.1434341162864607+4357 1.1855544921484864+4456 0.935738517553156+4555 1.2367099547145342+4654 1.2909424329951484+4753 1.3264400538531225+4852 1.3685529705611144+4951 1.4105760332671073
gnuplot.cabal view
@@ -1,5 +1,5 @@ Name: gnuplot-Version: 0.4+Version: 0.4.0.1 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -36,6 +36,8 @@ execute/tmp/Graphics/Gnuplot/Execute.hs execute/pipe/Graphics/Gnuplot/Execute.hs execute/shell/Graphics/Gnuplot/Execute.hs+Data-Files:+ data/runtime.data Flag splitBase description: Choose the new smaller, split-up base package.@@ -122,7 +124,9 @@ Graphics.Gnuplot.Terminal Executable gnuplot-demo- If !flag(buildExamples)+ If flag(buildExamples)+ Build-Depends: filepath >=1.1 && <1.2+ Else Buildable: False GHC-Options: -Wall Hs-Source-Dirs: src, execute/tmp
src/Demo.hs view
@@ -18,8 +18,13 @@ import qualified Graphics.Gnuplot.Graph.TwoDimensional as Graph2D import Graphics.Gnuplot.Plot.TwoDimensional (linearScale, ) +import qualified Graphics.Gnuplot.LineSpecification as LineSpec+ import qualified Data.Time as Time +import qualified Paths_gnuplot as Path+import System.FilePath ((</>), )+ import Data.Array (listArray, ) import Data.Monoid (mappend, ) @@ -53,6 +58,21 @@ `mappend` circle2d +file2d :: FilePath -> FilePath -> Frame.T (Graph2D.T Int Double)+file2d path file =+ let lineSpec =+ Graph2D.lineSpec $+ LineSpec.title "runtimes" $+ LineSpec.lineWidth 2.5 $+ LineSpec.deflt+ frameOpts =+ Opts.xLabel "input size" $+ Opts.yLabel "runtime (ms)" $+ Opts.title ("Graph from " ++ file) $+ Opts.deflt+ in Frame.cons frameOpts $ fmap lineSpec $+ Plot2D.pathFromFile Graph2D.lines (path </> file) 1 2+ mixed2d :: MultiPlot.T mixed2d = MultiPlot.simpleFromPartArray $@@ -123,6 +143,8 @@ Plot.plot X11.cons list2d Plot.plot X11.cons candle2d Plot.plot X11.cons overlay2d+ Plot.plot X11.cons . flip file2d "runtime.data"+ =<< fmap (</> "data") Path.getDataDir Plot.plot X11.cons mixed2d Plot.plot X11.cons size2d Plot.plot X11.cons wave3d
src/Graphics/Gnuplot/Plot/TwoDimensional.hs view
@@ -30,6 +30,7 @@ {- | Plots can be assembled using 'mappend' or 'mconcat'.+You can alter attributes of embedded graphs using 'fmap'. -} type T x y = Plot.T (Graph.T x y)
src/Graphics/Gnuplot/Private/Graph2D.hs view
@@ -75,5 +75,8 @@ typ :: Type -> T x y -> T x y typ t gr = gr{type_ = t} +{- |+You can alter the line specification of graphs in a plot using 'fmap'.+-} lineSpec :: LineSpec.T -> T x y -> T x y lineSpec ls gr = gr{lineSpec_ = ls}