fix whitespace errors

This commit is contained in:
Vivian McPhail 2013-07-26 20:09:59 +12:00
parent 9d1cb35f54
commit 0d65827162
5 changed files with 25 additions and 20 deletions

5
TODO
View File

@ -23,6 +23,8 @@ FEATURES
* ticks separate x axis groups for bar plots (rather than centre)
* alternating shaded/transparent by major tick
BUGS
* Log range crashing
@ -60,6 +62,9 @@ REFACTOR
* re-factor Axis.hs tickPositions and renderAxisTicks
* MVar data series for continuous update
* autorefresh (plot-gtk?)
COMPLETE
| * area

View File

@ -96,11 +96,11 @@ figure = do
setPlots 1 1
withPlot (1,1) $ do
setDataset (Bar, lx, [hx,hy,he])
barSetting BarStack
-- setDataset (Bar, lx, [hx,hy,he])
-- barSetting BarStack
-- setDataset (Line, mx, [rx])
-- setDataset (Line, ts, [ds])
-- setDataset (ts,[line ds blue])
setDataset (ts,[line ds blue])
-- setDataset (ts,[impulse fs blue])
-- setDataset (ts,[point (ds,es,"Sampled data") (Bullet,green)
-- setDataset (ts,[bar (ds,ds+es,"Sampled data") green
@ -121,8 +121,8 @@ figure = do
withAxisLabel $ setText "time (s)"
--setTicks Major (TickValues $ fromList [1,2,5,10])
setTicks Major (TickNumber 12)
setTicks Minor (TickNumber 0)
setTickLabelFormat $ Printf "%.0f"
setTicks Minor (TickNumber 100)
setTickLabelFormat $ Printf "%.2f"
--setTickLabels ["Jan","Feb","Mar","Apr","May"]
--withTickLabelFormat $ setFontSize 8
addAxis YAxis (Side Lower) $ do
@ -130,9 +130,9 @@ figure = do
withAxisLabel $ setText "amplitude (α)"
setTicks Minor (TickNumber 0)
-- addAxis XAxis (Value 0) $ return ()
--setRangeFromData XAxis Lower Linear
-- setRangeFromData XAxis Lower Linear
setRangeFromData YAxis Lower Linear
setRange XAxis Lower Linear 0 11
-- setRange XAxis Lower Linear 0 11
{- withAnnotations $ do
arrow True (pi/2,0.5) (0,0) (return ())
--oval True (0.5,1) (1,3) $ setBarColour blue

View File

@ -165,18 +165,18 @@ renderFigure (Figure b p t s d) = do
C.paint
C.restore
applyPads p
applyPads p
tx <- bbCentreWidth
ty <- bbTopHeight
(_,th) <- renderText t Centre TTop tx ty
bbLowerTop (th+textPad)
tx <- bbCentreWidth
ty <- bbTopHeight
(_,th) <- renderText t Centre TTop tx ty
bbLowerTop (th+textPad)
sx <- bbCentreWidth
sy <- bbTopHeight
(_,sh) <- renderText s Centre TTop sx sy
bbLowerTop (sh+textPad)
sx <- bbCentreWidth
sy <- bbTopHeight
(_,sh) <- renderText s Centre TTop sx sy
bbLowerTop (sh+textPad)
renderPlots d
renderPlots d
-----------------------------------------------------------------------------

View File

@ -177,7 +177,7 @@ setTextOptionsFD (TextOptions (FontOptions ff fs fv fw fc) fz c) fd = do
P.fontDescriptionSetWeight fd fw
P.fontDescriptionSetStretch fd fc
P.fontDescriptionSetSize fd fz
setColour c
setColour c
-----------------------------------------------------------------------------

View File

@ -2,11 +2,11 @@ Name: plot
Version: 0.2.1
License: BSD3
License-file: LICENSE
Copyright: (c) A.V.H. McPhail 2010, 2012
Copyright: (c) A.V.H. McPhail 2010, 2012, 2013
Author: Vivian McPhail
Maintainer: haskell.vivian.mcphail <at> gmail <dot> com
Stability: experimental
Homepage: http://code.haskell.org/plot
Homepage: http://github.com/amcphail/plot
Synopsis: A plotting library, exportable as eps/pdf/svg/png or renderable with gtk
Description:
A package for creating plots, built on top of the Cairo rendering engine.