From dab446df7a8573f9a2e6aeb49f43621447572f07 Mon Sep 17 00:00:00 2001 From: Vivian McPhail Date: Sat, 2 Oct 2010 14:27:47 +1300 Subject: [PATCH] fix examples for Scale darcs-hash:20101002012747-af16d-956a2c7f454d4725a7fd231eca6f8eb76e01e9d3.gz --- CHANGES | 3 +++ examples/perturbed-sine.hs | 6 +++--- lib/Graphics/Rendering/Plot.hs | 10 +++++----- plot.cabal | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index f8e2f0a..119b2ee 100644 --- a/CHANGES +++ b/CHANGES @@ -5,3 +5,6 @@ 0.1.1.1: * export MinMaxSeries + +0.1.1.2: + * fixed examples for Scale (Log/Linear) \ No newline at end of file diff --git a/examples/perturbed-sine.hs b/examples/perturbed-sine.hs index 9dcac91..46edab6 100644 --- a/examples/perturbed-sine.hs +++ b/examples/perturbed-sine.hs @@ -20,7 +20,7 @@ import Data.Packed() import qualified Data.Array.IArray as A -import Numeric.LinearAlgebra.Linear +import Numeric.LinearAlgebra --import Numeric.LinearAlgebra.Instances --import Numeric.LinearAlgebra.Interface @@ -53,8 +53,8 @@ figure = do addAxis XAxis (Side Lower) $ withAxisLabel $ setText "time (s)" addAxis YAxis (Side Lower) $ withAxisLabel $ setText "amplitude" addAxis XAxis (Value 0) $ return () - setRangeFromData XAxis Lower - setRange YAxis Lower (-1.25) 1.25 + setRangeFromData XAxis Lower Linear + setRange YAxis Lower Linear (-1.25) 1.25 display :: ((Int,Int) -> C.Render ()) -> IO () display r = do diff --git a/lib/Graphics/Rendering/Plot.hs b/lib/Graphics/Rendering/Plot.hs index 1615c4e..133a39d 100644 --- a/lib/Graphics/Rendering/Plot.hs +++ b/lib/Graphics/Rendering/Plot.hs @@ -58,8 +58,8 @@ Perform actions in 'Figure a' to create a figure > addAxis XAxis (Side Lower) $ withAxisLabel $ setText "time (s)" > addAxis YAxis (Side Lower) $ withAxisLabel $ setText "amplitude" > addAxis XAxis (Value 0) $ return () -> setRangeFromData XAxis Lower -> setRange YAxis Lower (-1.25) 1.25 +> setRangeFromData XAxis Lower Linear +> setRange YAxis Lower Linear (-1.25) 1.25 Render the graph to a Cairo 'Render ()' action that takes the width and height of the drawing area @@ -75,7 +75,7 @@ The same graph using the 'Simple' interface > subtitle "with 1 second of a 15Hz sine wave" > xlabel "time (s)" > ylabel "amplitude" -> yrange (-1.25) 1.25 +> yrange Linear (-1.25) 1.25 The 'Render a' action can be used in GTK or with Cairo to write to file in PS, PDF, SVG, or PNG @@ -90,8 +90,8 @@ Display a greyscale matrix > setDataset ms > addAxis XAxis (Side Lower) $ setTickLabelFormat "%.0f" > addAxis YAxis (Side Lower) $ setTickLabelFormat "%.0f" -> setRangeFromData XAxis Lower -> setRangeFromData YAxis Lower +> setRangeFromData XAxis Lower Linear +> setRangeFromData YAxis Lower Linear The ODE example from hmatrix: diff --git a/plot.cabal b/plot.cabal index 3818fcd..88946d3 100644 --- a/plot.cabal +++ b/plot.cabal @@ -1,5 +1,5 @@ Name: plot -Version: 0.1.1.1 +Version: 0.1.1.2 License: BSD3 License-file: LICENSE Copyright: (c) A.V.H. McPhail 2010