gnuplot 0.5.2.2 → 0.5.3
raw patch · 6 files changed
+28/−13 lines, 6 filesdep ~transformers
Dependency ranges changed: transformers
Files
- gnuplot.cabal +3/−3
- src/Demo.hs +7/−7
- src/Graphics/Gnuplot/Frame/OptionSet.hs +13/−2
- src/Graphics/Gnuplot/Private/FrameOption.hs +1/−0
- src/Graphics/Gnuplot/Private/FrameOptionSet.hs +1/−0
- src/Graphics/Gnuplot/Simple.hs +3/−1
gnuplot.cabal view
@@ -1,5 +1,5 @@ Name: gnuplot-Version: 0.5.2.2+Version: 0.5.3 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -50,7 +50,7 @@ data/runtime.data Source-Repository this- Tag: 0.5.2.2+ Tag: 0.5.3 Type: darcs Location: http://code.haskell.org/gnuplot/ @@ -86,7 +86,7 @@ utility-ht >=0.0.8 && <0.1, data-accessor-transformers >=0.2.1 && <0.3, data-accessor >=0.2.2 && <0.3,- transformers >=0.3 && <0.4,+ transformers >=0.3 && <0.5, deepseq >=1.0 && <1.4 If flag(splitBase) Build-Depends:
src/Demo.hs view
@@ -62,7 +62,7 @@ overlay2d :: Frame.T (Graph2D.T Double Double) overlay2d =- Frame.cons (Opts.size 1 0.4 $ Opts.key False $ Opts.deflt) $+ Frame.cons (Opts.size 1 0.4 $ defltOpts) $ Plot2D.function Graph2D.lines (linearScale 100 (-pi,pi)) cos `mappend` circle2d@@ -138,10 +138,10 @@ mixed2d :: MultiPlot.T mixed2d = MultiPlot.simpleFromPartArray $- listArray ((0::Int,0::Int), (0,2)) $+ listArray ((0,0), (0,2)::(Int,Int)) $ MultiPlot.partFromPlot circle2d : MultiPlot.partFromFrame- (Frame.cons (Opts.xFormat "%m-%d" $ Opts.key False $ Opts.deflt) $+ (Frame.cons (Opts.sizeSquare $ Opts.xFormat "%m-%d" $ defltOpts) $ candle2d) : MultiPlot.partFromPlot list2d : []@@ -153,11 +153,10 @@ size2d :: MultiPlot.T size2d = MultiPlot.simpleFromPartArray $- listArray ((0::Int,0::Int), (0,2)) $+ listArray ((0,0), (0,2)::(Int,Int)) $ MultiPlot.partFromPlot candle2d : MultiPlot.partFromFrame- (Frame.cons (Opts.yLabel "Fibonacci" $ Opts.key False $ Opts.deflt)- list2d) :+ (Frame.cons (Opts.yLabel "Fibonacci" $ defltOpts) list2d) : MultiPlot.partFromPlot candle2d : [] @@ -171,6 +170,7 @@ let meshNodes = linearScale 20 (-2,2) in Frame.cons (Opts.grid True $+ Opts.view 42 17 1 1 $ Opts.xRange3d (-2.5,2.5) $ Opts.yRange3d (-2.5,2.5) $ defltOpts) $@@ -205,7 +205,7 @@ MultiPlot.partFromFrame wave3d in MultiPlot.title "multiplot of 2d and 3d graphics" $ MultiPlot.simpleFromPartArray $- listArray ((0::Int,0::Int), (2,4)) $+ listArray ((0,0), (2,4)::(Int,Int)) $ prefix ++ center : suffix
src/Graphics/Gnuplot/Frame/OptionSet.hs view
@@ -8,6 +8,8 @@ OptionSet.addBool, size,+ sizeRatio,+ sizeSquare, title, key, keyInside,@@ -56,7 +58,7 @@ import Graphics.Gnuplot.Private.FrameOptionSet (T, ) -import Graphics.Gnuplot.Utility (quote, )+import Graphics.Gnuplot.Utility (quote, commaConcat, ) import qualified Data.List as List @@ -69,6 +71,14 @@ size x y = OptionSet.add Option.sizeScale [show x ++ ", " ++ show y] +sizeRatio :: Graph.C graph => Double -> T graph -> T graph+sizeRatio r =+ OptionSet.add Option.sizeRatio ["ratio", show r]++sizeSquare :: Graph.C graph => T graph -> T graph+sizeSquare =+ OptionSet.add Option.sizeRatio ["square"]+ title :: Graph.C graph => String -> T graph -> T graph title text = OptionSet.add Option.title [quote text]@@ -181,7 +191,8 @@ Double {- ^ scaleZ -} -> T (Graph3D.T x y z) -> T (Graph3D.T x y z) view rotateX rotateZ scale scaleZ =- OptionSet.add Option.view [show rotateX, show rotateZ, show scale, show scaleZ]+ OptionSet.add Option.view+ [commaConcat [show rotateX, show rotateZ, show scale, show scaleZ]] {- | Show flat pixel map.
src/Graphics/Gnuplot/Private/FrameOption.hs view
@@ -79,6 +79,7 @@ sizeScale :: T; sizeScale = size "scale"+sizeRatio :: T; sizeRatio = size "ratio" keyShow :: T; keyShow = key "show" keyPosition :: T; keyPosition = key "position"
src/Graphics/Gnuplot/Private/FrameOptionSet.hs view
@@ -34,6 +34,7 @@ Map.fromList $ (Option.keyShow, []) : -- (Option.border, []) :+ (Option.sizeRatio, ["noratio"]) : (Option.xLabelText, []) : (Option.yLabelText, []) : (Option.zLabelText, []) :
src/Graphics/Gnuplot/Simple.hs view
@@ -99,6 +99,7 @@ | Title String | XLabel String | YLabel String+ | ZLabel String | XRange (Double, Double) | YRange (Double, Double) | ZRange (Double, Double)@@ -401,6 +402,7 @@ attrToProg (Title title_) = "set title " ++ quote title_ attrToProg (XLabel label) = "set xlabel " ++ quote label attrToProg (YLabel label) = "set ylabel " ++ quote label+attrToProg (ZLabel label) = "set zlabel " ++ quote label attrToProg (XRange _) = "" -- xrange is handled in plot command attrToProg (YRange _) = "" -- yrange is handled in plot command attrToProg (ZRange _) = "" -- zrange is handled in plot command@@ -507,7 +509,7 @@ [Attribute] -> [Attribute3d] -> Plot3D.T x y z -> IO () plot3d attrs pt plt = runGnuplot- (attrs ++ [Custom "pm3d" (map attribute3dToString pt)]) "splot" plt+ (Custom "pm3d" (map attribute3dToString pt) : attrs) "splot" plt lineSpecRecord :: LineSpec -> LineSpec.T