plot-light 0.2.5 → 0.2.6
raw patch · 4 files changed
+12/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- doc/fig/heatmap.png binary
- plot-light.cabal +1/−1
- src/Graphics/Rendering/Plot/Light.hs +9/−1
- src/Graphics/Rendering/Plot/Light/Internal.hs +2/−2
doc/fig/heatmap.png view
binary file changed (61305 → 41701 bytes)
plot-light.cabal view
@@ -1,5 +1,5 @@ name: plot-light-version: 0.2.5+version: 0.2.6 synopsis: A lightweight plotting library, exporting to SVG description: This library provides drawing and plotting datastructures and functions; it is aimed in particular at scientific visualization, but it also exposes its plotting primitives and a general purpose 2D geometry library. homepage: https://github.com/ocramz/plot-light
src/Graphics/Rendering/Plot/Light.hs view
@@ -24,7 +24,15 @@ -- -- === 1. Heatmap plot of a 2D function ----- <<doc/fig/heatmap.png#diagram=heatmap&height=200&width=266>>+-- <<doc/fig/heatmap.png>>+--+-- This example renders the function+--+-- \[+-- {f(x, y) = \cos(\pi \theta) \sin( \rho^2) }+-- \]+-- where+-- \( \rho^2 = x^2 + y^2 \) and \( \theta = \arctan(y/x) \). -- -- > import qualified Data.Text.IO as T (readFile, writeFile) -- > import qualified Data.Text as T
src/Graphics/Rendering/Plot/Light/Internal.hs view
@@ -89,8 +89,8 @@ -- | A rectangle, defined by its center coordinates and side lengths ----- > > putStrLn $ renderSvg $ rectCentered (Point 20 30) 15 30 (Just C.blue) (Just C.red)--- > <g transform="translate(12.5 15.0)"><rect width="15.0" height="30.0" fill="#ff0000" stroke="#0000ff" /></g>+-- > > putStrLn $ renderSvg $ rectCentered 15 30 1 (Just C.blue) (Just C.red) (Point 20 30)+-- > <rect x="12.5" y="15.0" width="15.0" height="30.0" fill="#ff0000" stroke="#0000ff" stroke-width="1.0" /> rectCentered :: (Show a, RealFrac a) => a -- ^ Width -> a -- ^ Height