matplotlib 0.4.4 → 0.4.5
raw patch · 2 files changed
+9/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Graphics.Matplotlib.Internal: escapeSlashes :: [Char] -> [Char]
Files
matplotlib.cabal view
@@ -1,5 +1,5 @@ name: matplotlib-version: 0.4.4+version: 0.4.5 synopsis: Bindings to Matplotlib; a Python plotting library description: Matplotlib is probably the most full featured plotting library out there.
src/Graphics/Matplotlib/Internal.hs view
@@ -332,13 +332,18 @@ ,"axes = [plot.gca()]" ,"ax = axes[0]"] +-- | These will be Python strings and slashes would cause unwanted control characters.+escapeSlashes ('\\':cs) = '\\':'\\':escapeSlashes cs+escapeSlashes (c:cs) = c:escapeSlashes cs+escapeSlashes [] = []+ -- | The python command that reads external data into the python data array pyReadData :: [Char] -> [[Char]]-pyReadData filename = ["data = json.loads(open('" ++ filename ++ "').read())"]+pyReadData filename = ["data = json.loads(open('" ++ escapeSlashes filename ++ "').read())"] -- | The python command that reads an image into the img variable pyReadImage :: [Char] -> [[Char]]-pyReadImage filename = ["img = mpimg.imread('" ++ filename ++ "')"]+pyReadImage filename = ["img = mpimg.imread('" ++ escapeSlashes filename ++ "')"] -- | Detach python so we don't block (TODO This isn't working reliably) pyDetach :: [[Char]]@@ -353,7 +358,7 @@ -- | Python code that saves a figure pyFigure :: [Char] -> [[Char]]-pyFigure output = ["plot.savefig('" ++ output ++ "')"]+pyFigure output = ["plot.savefig('" ++ escapeSlashes output ++ "')"] -- | Create a positional option o1 x = P $ toPythonOpt x