dynamic-plot 0.4.1.0 → 0.4.2.0
raw patch · 2 files changed
+35/−11 lines, 2 filesdep ~colour-spacedep ~free-vector-spacesdep ~manifolds
Dependency ranges changed: colour-space, free-vector-spaces, manifolds
Files
- Graphics/Dynamic/Plot/R2.hs +28/−4
- dynamic-plot.cabal +7/−7
Graphics/Dynamic/Plot/R2.hs view
@@ -28,6 +28,7 @@ {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE CPP #-} module Graphics.Dynamic.Plot.R2 ( -- * Display@@ -165,6 +166,9 @@ import Data.Basis import Data.AffineSpace import Data.Manifold.PseudoAffine+#if MIN_VERSION_manifolds(0,6,0)+import Data.Manifold.WithBoundary+#endif import Data.Function.Differentiable import Data.Manifold.Types import Data.Manifold.Shade@@ -174,6 +178,7 @@ import qualified Data.Map.Lazy as Map import qualified Data.Colour.Manifold as CSp+import qualified Data.Colour.Manifold.Internal as CSp import qualified Data.Random as Random import qualified System.Random as Random@@ -738,13 +743,24 @@ = JPix.promotePixel (CSp.quantiseColour c :: JPix.PixelRGB8) toRGBA _ = JPix.PixelRGBA8 0 0 0 0 +#if MIN_VERSION_manifolds(0,6,0)+instance Plottable (PointsWeb ℝ² (Shade CSp.ColourNeedle)) where+#else instance Plottable (PointsWeb ℝ² (Shade (CSp.Colour ℝ))) where- plot web = plot (coerceWebDomain web :: PointsWeb (ℝ,ℝ) (Shade (CSp.Colour ℝ)))+#endif+ plot web = plot (coerceWebDomain web :: PointsWeb (ℝ,ℝ) (Shade CSp.ColourNeedle)) +#if MIN_VERSION_manifolds(0,6,0)+instance Plottable (PointsWeb (ℝ,ℝ) (Shade CSp.ColourNeedle)) where+#else instance Plottable (PointsWeb (ℝ,ℝ) (Shade (CSp.Colour ℝ))) where- plot = webbedSurfPlot $ toRGBA+#endif+ plot = webbedSurfPlot toRGBA where toRGBA (Just c) = JPix.promotePixel . (CSp.quantiseColour :: CSp.Colour ℝ -> JPix.PixelRGB8)+#if MIN_VERSION_manifolds(0,6,0)+ . fromInterior+#endif <$> Random.rvar c toRGBA _ = return $ JPix.PixelRGBA8 0 0 0 0 @@ -1556,7 +1572,11 @@ uncertainFnPlot :: ∀ m . (SimpleSpace m, Scalar m ~ ℝ) => (ℝ -> (m +> ℝ)) -> Shade' m -> DynamicPlottable uncertainFnPlot = case linearManifoldWitness :: LinearManifoldWitness m of- LinearManifoldWitness BoundarylessWitness -> \mfun (Shade' mBest me)+ LinearManifoldWitness+#if !MIN_VERSION_manifolds(0,6,0)+ BoundarylessWitness+#endif+ -> \mfun (Shade' mBest me) -> plot $ continFnPlot (($ mBest) . mfun) : [ tweakPrerendered (Dia.opacity 0.2) $ continFnPlot (($ mBest^+^σ*^δm) . mfun)@@ -1575,7 +1595,11 @@ -> DynamicPlottable) -> DynamicPlottable lrp _ _ [] _ = mempty- lrp (LinearManifoldWitness BoundarylessWitness, DualSpaceWitness)+ lrp (LinearManifoldWitness+#if !MIN_VERSION_manifolds(0,6,0)+ BoundarylessWitness+#endif+ , DualSpaceWitness) mfun dataPts resultHook = resultHook shm (plot [ plot (Shade (x,y) (sumSubspaceNorms mempty $ dualNorm ey) :: Shade (ℝ,ℝ))
dynamic-plot.cabal view
@@ -1,5 +1,5 @@ Name: dynamic-plot-Version: 0.4.1.0+Version: 0.4.2.0 Category: graphics Synopsis: Interactive diagram windows Description: Haskell excels at handling data like continuous functions@@ -27,7 +27,7 @@ Maintainer: (@) jsag $ hvl.no Homepage: https://github.com/leftaroundabout/dynamic-plot Build-Type: Simple-Cabal-Version: >=1.18+Cabal-Version: 1.18 Extra-Doc-Files: images/examples/*.png , images/examples/*.gif @@ -51,20 +51,20 @@ , deepseq , process , constrained-categories >= 0.2- , free-vector-spaces >= 0.1 && < 0.2+ , free-vector-spaces >= 0.1 && < 0.3 , linearmap-category >=0.3.5 , diagrams-core , diagrams-lib >= 1.3 && < 1.5 , diagrams-cairo , diagrams-gtk- , gtk > 0.10 && < 0.15+ , gtk > 0.10 && < 0.16 , glib , colour >= 2 && < 3- , manifolds >= 0.4.2 && < 0.6+ , manifolds >= 0.4.2 && < 0.7 , manifold-random- , colour-space+ , colour-space >=0.2 , JuicyPixels > 3 && < 4- , lens < 5.0+ , lens < 6.0 Other-Extensions: FlexibleInstances , TypeFamilies , FlexibleContexts