matplotlib 0.5.0 → 0.6.0
raw patch · 3 files changed
+12/−2 lines, 3 filesdep +deepseqPVP ok
version bump matches the API change (PVP)
Dependencies added: deepseq
API changes (from Hackage documentation)
+ Graphics.Matplotlib.Internal: instance Control.DeepSeq.NFData Graphics.Matplotlib.Internal.Matplotlib
+ Graphics.Matplotlib.Internal: instance Control.DeepSeq.NFData Graphics.Matplotlib.Internal.MplotCommand
Files
matplotlib.cabal view
@@ -1,5 +1,5 @@ name: matplotlib-version: 0.5.0+version: 0.6.0 synopsis: Bindings to Matplotlib; a Python plotting library description: Matplotlib is probably the most full featured plotting library out there.@@ -25,6 +25,7 @@ exposed-modules: Graphics.Matplotlib.Internal , Graphics.Matplotlib build-depends: base >= 4.7 && < 5+ , deepseq , process , bytestring , aeson
src/Graphics/Matplotlib.hs view
@@ -444,7 +444,7 @@ setSizeInches w h = mp # "fig.set_size_inches(" # w # "," # h # ", forward=True)" -tightLayout = mp # "fig.tight_layout()"+tightLayout = mp # "fig.tight_layout(" ## ")" xkcd = mp # "plot.xkcd()"
src/Graphics/Matplotlib/Internal.hs view
@@ -8,6 +8,7 @@ import System.Process import Data.Aeson import Control.Monad+import Control.DeepSeq import System.IO import qualified Data.ByteString.Lazy as B import Data.List@@ -36,6 +37,9 @@ mempty = mp mappend = (%) +instance NFData Matplotlib where+ rnf (Matplotlib cs po re) = rnf cs `seq` rnf po `seq` rnf re+ -- | A maplotlib command, right now we have a very shallow embedding essentially -- dealing in strings containing python code as well as the ability to load -- data. The loaded data should be a json object.@@ -43,6 +47,11 @@ LoadData B.ByteString | forall x. MplotImage x => LoadImage x | Exec { es :: String }++instance NFData MplotCommand where+ rnf (LoadData b) = rnf b+ rnf (Exec es) = rnf es+ -- don't care too much about the LoadImage -- | Throughout the API we need to accept options in order to expose -- matplotlib's many configuration options.