mirror of
https://github.com/codedownio/haskell-plot.git
synced 2025-04-15 19:06:09 +00:00
fix examples for Scale
darcs-hash:20101002012747-af16d-956a2c7f454d4725a7fd231eca6f8eb76e01e9d3.gz
This commit is contained in:
parent
c9958b18d0
commit
dab446df7a
3
CHANGES
3
CHANGES
@ -5,3 +5,6 @@
|
||||
|
||||
0.1.1.1:
|
||||
* export MinMaxSeries
|
||||
|
||||
0.1.1.2:
|
||||
* fixed examples for Scale (Log/Linear)
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user