packages feed

gnuplot 0.5.6.1 → 0.5.7

raw patch · 13 files changed

+108/−42 lines, 13 filesdep ~containersdep ~deepseqdep ~filepathPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers, deepseq, filepath, shell-utility, time, transformers

API changes (from Hackage documentation)

+ Graphics.Gnuplot.Graph.TwoDimensional: labels :: (C x, C y) => T x y ((x, y), Label)
+ Graphics.Gnuplot.Terminal.QT: cons :: T
+ Graphics.Gnuplot.Terminal.QT: data T
+ Graphics.Gnuplot.Terminal.QT: instance Graphics.Gnuplot.Private.Terminal.C Graphics.Gnuplot.Terminal.QT.T
+ Graphics.Gnuplot.Terminal.QT: noPersist :: T -> T
+ Graphics.Gnuplot.Terminal.QT: noTitle :: T -> T
+ Graphics.Gnuplot.Terminal.QT: persist :: T -> T
+ Graphics.Gnuplot.Terminal.QT: title :: String -> T -> T
+ Graphics.Gnuplot.Value.Tuple: Label :: String -> Label
+ Graphics.Gnuplot.Value.Tuple: instance Graphics.Gnuplot.Value.Tuple.C Graphics.Gnuplot.Value.Tuple.Label
+ Graphics.Gnuplot.Value.Tuple: newtype Label

Files

Changes.md view
@@ -1,5 +1,13 @@ # Change log for the `gnuplot` Haskell binding +## 0.5.7:++ * `Gnuplot.Terminal.QT`++ * `Gnuplot.Execute`:+   Do longer call `pgnuplot` on Windows.+   It is gone in gnuplot-5.0 in January 2015.+ ## 0.5.5:   * `Gnuplot.Utility.quote` bugfix:
Makefile view
@@ -1,16 +1,16 @@ ghci:	ghci-tmp  ghci-tmp:-	ghci -Wall -i:src:dist/build/autogen:os/generic:execute/tmp src/Graphics/Gnuplot/Simple.hs+	ghci -Wall -i:src:dist/build/autogen:execute/tmp src/Graphics/Gnuplot/Simple.hs  ghci-pipe:-	ghci -Wall -i:src:dist/build/autogen:os/generic:execute/pipe src/Graphics/Gnuplot/Simple.hs+	ghci -Wall -i:src:dist/build/autogen:execute/pipe src/Graphics/Gnuplot/Simple.hs  ghci-shell:-	ghci -Wall -i:src:dist/build/autogen:os/generic:execute/shell src/Graphics/Gnuplot/Simple.hs+	ghci -Wall -i:src:dist/build/autogen:execute/shell src/Graphics/Gnuplot/Simple.hs  ghci-demo:-	ghci -Wall -i:src:dist/build/autogen:os/generic:execute/tmp src/Demo.hs+	ghci -Wall -i:src:dist/build/autogen:execute/tmp src/Demo.hs  testbuild: 	runhaskell Setup configure --user -f buildExamples
execute/pipe/Graphics/Gnuplot/Execute.hs view
@@ -1,7 +1,5 @@ module Graphics.Gnuplot.Execute where -import Graphics.Gnuplot.Private.OS (gnuplotName, )- import System.Exit (ExitCode, ) import System.IO (hPutStr, ) import qualified System.Process as Proc@@ -14,6 +12,6 @@ simple program options =    do -- putStrLn cmd       (inp,_out,_err,pid) <--         Proc.runInteractiveProcess gnuplotName options Nothing Nothing+         Proc.runInteractiveProcess "gnuplot" options Nothing Nothing       hPutStr inp (unlines program)       Proc.waitForProcess pid
execute/shell/Graphics/Gnuplot/Execute.hs view
@@ -1,6 +1,5 @@ module Graphics.Gnuplot.Execute where -import Graphics.Gnuplot.Private.OS (gnuplotName, ) import Graphics.Gnuplot.Utility (semiColonConcat, )  import Shell.Utility.Quote as Quote@@ -15,7 +14,7 @@ simple program options =    let cmd =           "sh -c 'echo " ++ Quote.minimal (semiColonConcat program) ++-                 " | " ++ gnuplotName ++ " " ++ unwords options ++ "'"+                 " | gnuplot " ++ unwords options ++ "'"    in  do --putStrLn cmd           system cmd 
execute/tmp/Graphics/Gnuplot/Execute.hs view
@@ -1,7 +1,5 @@ module Graphics.Gnuplot.Execute where -import Graphics.Gnuplot.Private.OS (gnuplotName, )- import qualified System.IO as IO import System.IO.Temp (withSystemTempFile, ) import System.Exit (ExitCode, )@@ -19,9 +17,9 @@    withSystemTempFile tmpScript $ \path handle -> do       IO.hPutStr handle (unlines program)       IO.hClose handle-      -- putStrLn $ showCommandForUser gnuplotName (options ++ [path])+      -- putStrLn $ showCommandForUser "gnuplot" (options ++ [path])       (exitCode, _out, _err) <--         readProcessWithExitCode gnuplotName (options ++ [path]) []+         readProcessWithExitCode "gnuplot" (options ++ [path]) []       -- putStr out       -- putStr err       return exitCode
gnuplot.cabal view
@@ -1,6 +1,7 @@+Cabal-Version:    2.2 Name:             gnuplot-Version:          0.5.6.1-License:          BSD3+Version:          0.5.7+License:          BSD-3-Clause License-File:     LICENSE Author:           Henning Thielemann <haskell@henning-thielemann.de> Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>@@ -12,8 +13,9 @@    This is a wrapper to gnuplot    which lets you create 2D and 3D plots.    .-   Start a simple session with @make ghci@.-   This loads the module "Graphics.Gnuplot.Simple"+   Start a simple session with @cabal repl@.+   If not already loaded, call @:module Graphics.Gnuplot.Simple@+   in order to load "Graphics.Gnuplot.Simple"    which is ready for use in GHCi.    It does not address all fancy gnuplot features    in order to stay simple.@@ -36,22 +38,16 @@    .    Alternative packages: @plot@, @HPlot@, @Chart@, @textPlot@, @easyplot@ Tested-With:       GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3-Tested-With:       GHC==8.2.1-Cabal-Version:     >=1.8+Tested-With:       GHC==8.2.1, GHC==8.6.5 Build-Type:        Simple Extra-Source-Files:   Makefile   Changes.md-  execute/tmp/Graphics/Gnuplot/Execute.hs-  execute/pipe/Graphics/Gnuplot/Execute.hs-  execute/shell/Graphics/Gnuplot/Execute.hs-  os/windows/Graphics/Gnuplot/Private/OS.hs-  os/generic/Graphics/Gnuplot/Private/OS.hs Data-Files:   data/runtime.data  Source-Repository this-  Tag:         0.5.6.1+  Tag:         0.5.7   Type:        darcs   Location:    http://code.haskell.org/gnuplot/ @@ -80,13 +76,14 @@     utility-ht >=0.0.12 && <0.1,     data-accessor-transformers >=0.2.1 && <0.3,     data-accessor >=0.2.2 && <0.3,-    transformers >=0.3 && <0.6,+    transformers >=0.3 && <0.7,     semigroups >=0.1 && <1.0,     deepseq >=1.0 && <1.5,     process >=1.0 && <1.7,-    time >=1.5 && <1.10,+    time >=1.5 && <1.14,     base >=2 && <5 +  Default-Language: Haskell98   GHC-Options: -Wall    Hs-Source-Dirs: src@@ -95,13 +92,9 @@   Else     If flag(executeShell)       Hs-Source-Dirs: execute/shell-      Build-Depends: shell-utility >=0.0 && <0.1+      Build-Depends: shell-utility >=0.0 && <0.2     Else       Hs-Source-Dirs: execute/tmp-  If os(windows)-    Hs-Source-Dirs: os/windows-  Else-    Hs-Source-Dirs: os/generic    Exposed-Modules:     Graphics.Gnuplot.Simple@@ -115,6 +108,7 @@     Graphics.Gnuplot.Terminal.PNG     Graphics.Gnuplot.Terminal.SVG     Graphics.Gnuplot.Terminal.WXT+    Graphics.Gnuplot.Terminal.QT     Graphics.Gnuplot.Terminal.X11     Graphics.Gnuplot.Encoding     Graphics.Gnuplot.Frame@@ -152,7 +146,6 @@     Graphics.Gnuplot.Private.Display     Graphics.Gnuplot.Private.File     Graphics.Gnuplot.Private.Command-    Graphics.Gnuplot.Private.OS     Graphics.Gnuplot.Utility     Graphics.Gnuplot.Execute @@ -167,6 +160,8 @@       base   Else     Buildable: False+  Default-Language: Haskell98   GHC-Options: -Wall   Main-Is: src/Demo.hs   Other-Modules: Paths_gnuplot+  Autogen-Modules: Paths_gnuplot
− os/generic/Graphics/Gnuplot/Private/OS.hs
@@ -1,4 +0,0 @@-module Graphics.Gnuplot.Private.OS where--gnuplotName :: String-gnuplotName = "gnuplot"
− os/windows/Graphics/Gnuplot/Private/OS.hs
@@ -1,4 +0,0 @@-module Graphics.Gnuplot.Private.OS where--gnuplotName :: String-gnuplotName = "pgnuplot"
src/Demo.hs view
@@ -19,6 +19,7 @@ import Graphics.Gnuplot.Plot.TwoDimensional (linearScale, )  import qualified Graphics.Gnuplot.LineSpecification as LineSpec+import Graphics.Gnuplot.Value.Tuple (Label(Label))  import qualified Data.Time as Time @@ -47,6 +48,12 @@ list2d =    Plot2D.list Graph2D.listPoints [0,1,1,2,3,5,8,13] +labels2d :: Plot2D.T Double Double+labels2d =+   Plot2D.list Graph2D.labels $+   flip map [1..12] $+   \t -> (let w = fromInteger t*2*pi/12 in (sin w, cos w), Label $ show t)+ candle2d :: Plot2D.T Time.Day Double candle2d =    Plot2D.list Graph2D.candleSticks $@@ -201,6 +208,7 @@ main = sequence_ $    GP.plotDefault simple2d :    GP.plotDefault list2d :+   GP.plotDefault labels2d :    GP.plotDefault candle2d :    GP.plotDefault image2d :    GP.plotDefault histogram2d :
src/Graphics/Gnuplot/Graph/TwoDimensional.hs view
@@ -51,6 +51,8 @@    filledStripe,    filledStripeAbove,    filledStripeBelow,++   labels,    ) where  import Graphics.Gnuplot.Private.Graph2D
src/Graphics/Gnuplot/Private/Graph2DType.hs view
@@ -2,6 +2,7 @@  import qualified Graphics.Gnuplot.Value.Atom as Atom import qualified Graphics.Gnuplot.Value.Tuple as Tuple+import Graphics.Gnuplot.Value.Tuple (Label) import Prelude hiding (lines, )  @@ -68,7 +69,9 @@ filledStripeAbove :: (Atom.C x, Atom.C y) => T x y (x,(y,y)) filledStripeBelow :: (Atom.C x, Atom.C y) => T x y (x,(y,y)) +labels          :: (Atom.C x, Atom.C y) => T x y ((x,y),Label) + listLines       = Cons "lines" listPoints      = Cons "points" listLinesPoints = Cons "linespoints"@@ -114,6 +117,8 @@ filledStripe      = Cons "filledcurves" filledStripeAbove = Cons "filledcurves above" filledStripeBelow = Cons "filledcurves below"++labels       = Cons "labels"   toString :: T x y a -> String
+ src/Graphics/Gnuplot/Terminal/QT.hs view
@@ -0,0 +1,53 @@+{- |+Terminal using QT.+Derived from wxt.+-}+module Graphics.Gnuplot.Terminal.QT (+   T, cons,+   title, noTitle,+   persist, noPersist,+   ) where++import qualified Graphics.Gnuplot.Private.Terminal as Terminal+import Data.Maybe (catMaybes, )+import Graphics.Gnuplot.Utility (quote, formatBool, )+++data T =+   Cons {+      title_ :: Maybe String,+      persist_ :: Maybe Bool+   }++cons :: T+cons =+   Cons {+      title_ = Nothing,+      persist_ = Nothing+   }+++title :: String -> T -> T+title text term = term{title_ = Just text}++noTitle :: T -> T+noTitle term = term{title_ = Nothing}++persist, noPersist :: T -> T+persist   term = term{persist_ = Just True}+noPersist term = term{persist_ = Just False}+++instance Terminal.C T where+   canonical term =+      Terminal.Cons {+         Terminal.precommands = [],+         Terminal.options =+            "qt" :+            catMaybes (+               (fmap quote $ title_ term) :+               (fmap (formatBool "persist") $ persist_ term) :+               []),+         Terminal.commands = [],+         Terminal.interactive = True+      }
src/Graphics/Gnuplot/Value/Tuple.hs view
@@ -7,8 +7,11 @@ module Graphics.Gnuplot.Value.Tuple (    C(text, columnCount),    ColumnCount(ColumnCount),+   Label(Label),    ) where +import Graphics.Gnuplot.Utility (quote)+ import Data.Time.Format (defaultTimeLocale, ) import qualified Data.Time as Time @@ -18,7 +21,9 @@  import Data.Function (id, ($), (.), ) import Text.Show (Show, ShowS, shows, showString, )-import Prelude (Eq, Ord, Int, Integer, Integral, Float, Double, realToFrac, (+), (++), )+import Prelude+         (Eq, Ord, String, Int, Integer, Integral, Float, Double,+          realToFrac, (+), (++), )   class C a where@@ -83,6 +88,9 @@    text d = text $ Time.UTCTime d 0 instance C Time.UTCTime where    text = singleton . showString . Time.formatTime defaultTimeLocale "%s"++newtype Label = Label String+instance C Label where text (Label str) = singleton $ showString $ quote str   instance (C a, C b) => C (a,b) where