packages feed

gnuplot 0.5.5.3 → 0.5.6

raw patch · 3 files changed

+31/−26 lines, 3 filesdep ~timedep ~utility-htPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: time, utility-ht

API changes (from Hackage documentation)

+ Graphics.Gnuplot.Plot.TwoDimensional: functionsWithLineSpec :: (C x, C y, C a, C b) => T x y (a, b) -> [a] -> [(T, a -> b)] -> T x y
- Graphics.Gnuplot.Advanced: plotDefault :: (C gfx) => gfx -> IO ExitCode
+ Graphics.Gnuplot.Advanced: plotDefault :: C gfx => gfx -> IO ExitCode
- Graphics.Gnuplot.Frame.OptionSet: boxwidthAbsolute :: (C graph) => Double -> T graph -> T graph
+ Graphics.Gnuplot.Frame.OptionSet: boxwidthAbsolute :: C graph => Double -> T graph -> T graph
- Graphics.Gnuplot.Frame.OptionSet: boxwidthRelative :: (C graph) => Double -> T graph -> T graph
+ Graphics.Gnuplot.Frame.OptionSet: boxwidthRelative :: C graph => Double -> T graph -> T graph
- Graphics.Gnuplot.Graph.TwoDimensional: histograms :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: histograms :: C y => T Int y y
- Graphics.Gnuplot.Graph.TwoDimensional: listDots :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: listDots :: C y => T Int y y
- Graphics.Gnuplot.Graph.TwoDimensional: listImpulses :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: listImpulses :: C y => T Int y y
- Graphics.Gnuplot.Graph.TwoDimensional: listLines :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: listLines :: C y => T Int y y
- Graphics.Gnuplot.Graph.TwoDimensional: listLinesPoints :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: listLinesPoints :: C y => T Int y y
- Graphics.Gnuplot.Graph.TwoDimensional: listPoints :: (C y) => T Int y y
+ Graphics.Gnuplot.Graph.TwoDimensional: listPoints :: C y => T Int y y
- Graphics.Gnuplot.Simple: Aspect :: (Aspect) -> Attribute
+ Graphics.Gnuplot.Simple: Aspect :: Aspect -> Attribute
- Graphics.Gnuplot.Simple: Border :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: Border :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: BoxAspect :: (Aspect) -> Attribute
+ Graphics.Gnuplot.Simple: BoxAspect :: Aspect -> Attribute
- Graphics.Gnuplot.Simple: ColorBox :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: ColorBox :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: Grid :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: Grid :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: Key :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: Key :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: Size :: (Size) -> Attribute
+ Graphics.Gnuplot.Simple: Size :: Size -> Attribute
- Graphics.Gnuplot.Simple: XTicks :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: XTicks :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: YTicks :: (Maybe [String]) -> Attribute
+ Graphics.Gnuplot.Simple: YTicks :: Maybe [String] -> Attribute
- Graphics.Gnuplot.Simple: plotList :: (C a) => [Attribute] -> [a] -> IO ()
+ Graphics.Gnuplot.Simple: plotList :: C a => [Attribute] -> [a] -> IO ()
- Graphics.Gnuplot.Simple: plotListStyle :: (C a) => [Attribute] -> PlotStyle -> [a] -> IO ()
+ Graphics.Gnuplot.Simple: plotListStyle :: C a => [Attribute] -> PlotStyle -> [a] -> IO ()
- Graphics.Gnuplot.Simple: plotLists :: (C a) => [Attribute] -> [[a]] -> IO ()
+ Graphics.Gnuplot.Simple: plotLists :: C a => [Attribute] -> [[a]] -> IO ()
- Graphics.Gnuplot.Simple: plotListsStyle :: (C a) => [Attribute] -> [(PlotStyle, [a])] -> IO ()
+ Graphics.Gnuplot.Simple: plotListsStyle :: C a => [Attribute] -> [(PlotStyle, [a])] -> IO ()
- Graphics.Gnuplot.Simple: plotPath :: (C a) => [Attribute] -> [(a, a)] -> IO ()
+ Graphics.Gnuplot.Simple: plotPath :: C a => [Attribute] -> [(a, a)] -> IO ()
- Graphics.Gnuplot.Simple: plotPathStyle :: (C a) => [Attribute] -> PlotStyle -> [(a, a)] -> IO ()
+ Graphics.Gnuplot.Simple: plotPathStyle :: C a => [Attribute] -> PlotStyle -> [(a, a)] -> IO ()
- Graphics.Gnuplot.Simple: plotPaths :: (C a) => [Attribute] -> [[(a, a)]] -> IO ()
+ Graphics.Gnuplot.Simple: plotPaths :: C a => [Attribute] -> [[(a, a)]] -> IO ()
- Graphics.Gnuplot.Simple: plotPathsStyle :: (C a) => [Attribute] -> [(PlotStyle, [(a, a)])] -> IO ()
+ Graphics.Gnuplot.Simple: plotPathsStyle :: C a => [Attribute] -> [(PlotStyle, [(a, a)])] -> IO ()

Files

gnuplot.cabal view
@@ -1,5 +1,5 @@ Name:             gnuplot-Version:          0.5.5.3+Version:          0.5.6 License:          BSD3 License-File:     LICENSE Author:           Henning Thielemann <haskell@henning-thielemann.de>@@ -51,7 +51,7 @@   data/runtime.data  Source-Repository this-  Tag:         0.5.5.3+  Tag:         0.5.6   Type:        darcs   Location:    http://code.haskell.org/gnuplot/ @@ -162,6 +162,7 @@       time,       array,       filepath,+      utility-ht,       base   Else     Buildable: False
src/Demo.hs view
@@ -29,6 +29,7 @@ import Data.Array (listArray, ) import Data.Foldable (foldMap, ) import Data.Monoid (mappend, mconcat, )+import Data.Tuple.HT (mapFst)   simple2d :: Plot2D.T Double Double@@ -88,8 +89,7 @@    ("1.0014", [192, 293, 458, 483, 890, 2000]) :    [] -names2d ::-   Frame.T (Graph2D.T Double Double)+names2d :: Frame.T (Graph2D.T Double Double) names2d =    let domain = (-10,10)        frameOpts =@@ -97,18 +97,14 @@           Opts.yRange2d (-1.5,1.5) $           Opts.deflt    in  Frame.cons frameOpts $-       foldMap (\(name,f) ->-          fmap (Graph2D.lineSpec-                   (LineSpec.title name $-                    LineSpec.deflt)) $-          Plot2D.function Graph2D.lines (linearScale 100 domain) f) $+       Plot2D.functionsWithLineSpec Graph2D.lines (linearScale 100 domain) $+       map (mapFst (flip LineSpec.title LineSpec.deflt)) $        ("sin", sin) :        ("cos", cos) :        ("tan", tan) :        [] -filled2d ::-   Frame.T (Graph2D.T Double Double)+filled2d :: Frame.T (Graph2D.T Double Double) filled2d =    let scale = linearScale 100 (-10,10)        wave style (lower,upper) =@@ -161,9 +157,7 @@    []  defltOpts :: Graph.C graph => Opts.T graph-defltOpts =-   Opts.key False $-   Opts.deflt+defltOpts = Opts.key False $ Opts.deflt  wave3d :: Frame.T (Graph3D.T Double Double Double) wave3d =@@ -174,9 +168,7 @@            Opts.xRange3d (-2.5,2.5) $            Opts.yRange3d (-2.5,2.5) $            defltOpts) $-       Plot3D.surface-          meshNodes meshNodes-          (\x y -> cos(x*x+y*y))+       Plot3D.surface meshNodes meshNodes (\x y -> cos(x*x+y*y))  lissajous3d :: Frame.T (Graph3D.T Double Double Double) lissajous3d =@@ -197,12 +189,8 @@                 (linearScale 48 (-pi,pi::Double))                 (\t -> (cos (t + pi/7*fromInteger k), sin (2*t)))) $           [0..13]-{--       center =-          MultiPlot.partFromFrame Frame.empty--}-       center =-          MultiPlot.partFromFrame wave3d+--       center = MultiPlot.partFromFrame Frame.empty+       center = MultiPlot.partFromFrame wave3d    in  MultiPlot.title "multiplot of 2d and 3d graphics" $        MultiPlot.simpleFromPartArray $        listArray ((0,0), (2,4)::(Int,Int)) $
src/Graphics/Gnuplot/Plot/TwoDimensional.hs view
@@ -5,6 +5,7 @@    list,    function,    functions,+   functionsWithLineSpec,    parameterFunction,     listFromFile,@@ -17,6 +18,7 @@ import qualified Graphics.Gnuplot.Private.Graph2DType as Type import qualified Graphics.Gnuplot.Private.Graph2D as Graph import qualified Graphics.Gnuplot.Private.Plot    as Plot+import qualified Graphics.Gnuplot.Private.LineSpecification as LineSpec import qualified Graphics.Gnuplot.Value.ColumnSet as Col import qualified Graphics.Gnuplot.Value.Tuple as Tuple import qualified Graphics.Gnuplot.Value.Atom  as Atom@@ -67,8 +69,19 @@    (Atom.C x, Atom.C y,     Tuple.C a, Tuple.C b) =>    Type.T x y (a,b) -> [a] -> [a -> b] -> T x y-functions typ args fs =-   let dat = map (\x -> (x, map ($ x) fs)) args+functions typ args =+   functionsWithLineSpec typ args . map ((,) LineSpec.deflt)++{- |+> functionsWithLineSpec Type.line (linearScale 1000 (-10,10)) $+>    map (mapFst (flip LineSpec.title LineSpec.deflt)) [("sin", sin), ("cos", cos)]+-}+functionsWithLineSpec ::+   (Atom.C x, Atom.C y,+    Tuple.C a, Tuple.C b) =>+   Type.T x y (a,b) -> [a] -> [(LineSpec.T, a -> b)] -> T x y+functionsWithLineSpec typ args fs =+   let dat = map (\x -> (x, map (($ x) . snd) fs)) args        mapType :: (a -> b) -> Type.T x y a -> Type.T x y b        mapType _ (Type.Cons str) = Type.Cons str        Tuple.ColumnCount na = Type.tupleSize $ mapType fst typ@@ -77,7 +90,10 @@           (assembleCells               (map (\(a,b) -> Tuple.text a ++ concatMap Tuple.text b) dat))           (Match.take fs $-           map (\ns -> Graph.deflt typ ([1..na] ++ ns)) $+           zipWith+              (\(lineSpec,_f) ns ->+                 Graph.lineSpec lineSpec $ Graph.deflt typ ([1..na] ++ ns))+              fs $            ListHT.sliceVertical nb [(na+1)..])