dynamic-plot 0.1.1.1 → 0.1.1.2
raw patch · 2 files changed
+18/−10 lines, 2 filesdep ~manifoldsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: manifolds
API changes (from Hackage documentation)
Files
- Graphics/Dynamic/Plot/R2.hs +16/−8
- dynamic-plot.cabal +2/−2
Graphics/Dynamic/Plot/R2.hs view
@@ -110,6 +110,7 @@ import Data.AffineSpace import Data.LinearMap.HerMetric import Data.Manifold.PseudoAffine+import Data.Function.Differentiable import Data.Manifold.Types import Data.Manifold.TreeCover import qualified Data.Map.Lazy as Map@@ -231,12 +232,18 @@ plot gs@(GraphWindowSpecR2{..}) = curves `deepseq` mkPlot (foldMap trace curves) where curves :: [[P2]]- curves = map (map $ convℝ² . snd)- $ discretisePathSegs xResolution (resolutionFunction gs)- (id&&&f <<< alg(+point x₀))+ curves = map (map $ convℝ² . snd) . gatherSides+ $ discretisePathSegs+ 1000+ ( const . metricFromLength+ $ (rBound-lBound)/fromIntegral xResolution+ , resolutionFunction gs )+ (lBound, rBound)+ (id&&&f) x₀ = (lBound + rBound)/2 trace (p:q:ps) = simpleLine p q <> trace (q:ps) trace _ = mempty+ gatherSides = uncurry (++) . (take 50 *** take 50) convℝ² = Dia.p2 c = realToFrac@@ -245,12 +252,12 @@ resolutionFunction GraphWindowSpecR2{..} = resoFunc where x₀ = (lBound + rBound)/2 w = rBound - lBound; h = tBound - bBound- ε = projector (recip δx, 0) + projector (0, recip δy)+ ε = projector (recip δx, 0) ^+^ projector (0, recip δy) δx = w / fromIntegral xResolution δy = h / fromIntegral yResolution resoFunc (x,y)- | x > lBound, x < rBound, y > bBound, y < tBound = ε- | otherwise = projector (qx,0) + projector (0,qy)+ | x >= lBound, x <= rBound, y >= bBound, y <= tBound = ε+ | otherwise = projector (recip qx,0) ^+^ projector (0,recip qy) where qx | x < lBound = lBound - x | x > rBound = x - rBound | otherwise = δx * qy/δy@@ -939,8 +946,9 @@ in mkPlot frame | otherwise -> y'm `seq` mkPlot- ( simpleLine ((xm-δxdef)^&(ym-δxdef*y'm))- ((xm+δxdef)^&(ym+δxdef*y'm)) )+ ( autoDashLine 0.5 ((xm-δxdef)^&(ym-δxdef*y'm))+ ((xm+δxdef)^&(ym+δxdef*y'm)) )+ _ -> mempty where xm = (rBound + lBound) / 2 δxdef = (rBound - lBound) / 10 δy = rfh * (tBound - bBound)
dynamic-plot.cabal view
@@ -1,5 +1,5 @@ Name: dynamic-plot-Version: 0.1.1.1+Version: 0.1.1.2 Category: graphics Synopsis: Interactive diagram windows Description: Haskell excels at handling data like continuous functions@@ -60,7 +60,7 @@ , gtk > 0.10 && < 0.15 , glib , colour >= 2 && < 3- , manifolds > 0.1.5.0 && < 0.1.6+ , manifolds == 0.1.6.2 , lens < 4.12.4 Other-Extensions: FlexibleInstances , TypeFamilies