gnuplot 0.3.2 → 0.3.3
raw patch · 4 files changed
+32/−2 lines, 4 files
Files
- gnuplot.cabal +2/−1
- src/Demo.hs +5/−0
- src/Graphics/Gnuplot/Frame.hs +8/−1
- src/Graphics/Gnuplot/Private/GraphEmpty.hs +17/−0
gnuplot.cabal view
@@ -1,5 +1,5 @@ Name: gnuplot-Version: 0.3.2+Version: 0.3.3 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -108,6 +108,7 @@ Graphics.Gnuplot.Private.Graph Graphics.Gnuplot.Private.Graph2D Graphics.Gnuplot.Private.Graph3D+ Graphics.Gnuplot.Private.GraphEmpty Graphics.Gnuplot.Utility Graphics.Gnuplot.Execute Graphics.Gnuplot.Display
src/Demo.hs view
@@ -54,6 +54,11 @@ (\t -> (cos (t + pi/7*fromInteger k), sin (2*t)))) $ [0..13] meshNodes = linearScale 20 (-2,2::Double)+{-+ center =+ MultiPlot.partFromFrame $+ Frame.empty+-} center = MultiPlot.partFromFrame $ Frame.cons
src/Graphics/Gnuplot/Frame.hs view
@@ -1,15 +1,22 @@ module Graphics.Gnuplot.Frame ( Frame.T,- cons, simple,+ cons, simple, empty, ) where import qualified Graphics.Gnuplot.Private.Frame as Frame import qualified Graphics.Gnuplot.Private.Plot as Plot import qualified Graphics.Gnuplot.Private.FrameOptionSet as Option+import qualified Graphics.Gnuplot.Private.GraphEmpty as Empty +import qualified Data.Monoid.State as State + cons :: Option.T graph -> Plot.T graph -> Frame.T graph cons = Frame.Cons simple :: Plot.T graph -> Frame.T graph simple = cons Option.deflt++empty :: Frame.T Empty.T+empty =+ simple (Plot.Cons (State.pure []))
+ src/Graphics/Gnuplot/Private/GraphEmpty.hs view
@@ -0,0 +1,17 @@+{-+This module is private since 'Cons' shall not be public.+However, 'Cons' is not needed at all+because the plot command (here @clear@)+is determined entirely by the graph type.+-}+module Graphics.Gnuplot.Private.GraphEmpty where++import qualified Graphics.Gnuplot.Private.Graph as Graph+++data T = Cons+++instance Graph.C T where+ command _ = "clear"+ toString = const ""